22 #include <sys/socket.h> 23 #include <netinet/in.h> 24 #include <netinet/tcp.h> 25 #include <sys/ioctl.h> 26 #include <linux/sockios.h> 36 socklen_t len (
sizeof(value));
37 if (::getsockopt(
fd(),SOL_TCP,TCP_NODELAY,&value,&len) < 0)
46 if (::setsockopt(
fd(),SOL_TCP,TCP_NODELAY,&ivalue,
sizeof(ivalue)) < 0)
54 if (::ioctl(
fd(),SIOCINQ,&n) < 0)
63 if (::ioctl(
fd(),SIOCOUTQ,&n) < 0)
#define SENF_THROW_SYSTEM_EXCEPTION(desc)
TCPSocketProtocol public header.
unsigned siocinq() const
Return current size of the input queue.
int fd() const
Get file descriptor.
unsigned available() const
Return (maximum) number of bytes available for reading without < blocking.
void close()
Close socket.
bool nodelay() const
Check current SO_NODELAY status.
bool eof() const
Check for end-of-file condition.
FileHandle fh() const
Get a FileHandle for this instance.
bool readable() const
Check, whether a read on the handle would not block (ignoring blocking state)
virtual void close()
Close socket.
void shutdown(ShutType type) const
unsigned siocoutq() const
Return current size of the output queue.