#include <lua/socket.lh>
- flag = handle:setsockopt(level, optname, value)
- value = handle:getsockopt(level, optname)
rawio:getsockopt() and rawio:setsockopt() manipulate the options that are associated with a socket.
Level | optname | Description |
---|---|---|
SOL_TCP | SO_NODELAY | A flag which, when non-zero, disables the nagle algorithm for TCP sockets. This means that data packets are sent as soon as possible instead of buffering them. This usually results in poor network performance. |
SOL_SOCKET | SO_DEBUG | A number value which enables printing of tracing messages to the kernel log when non zero. Higher values enable more verbose debugging. |