26 #ifndef NIDAS_CORE_TCPSOCKETIODEVICE_H
27 #define NIDAS_CORE_TCPSOCKETIODEVICE_H
31 namespace nidas {
namespace core {
84 size_t read(
void *buf,
size_t len,
int msecTimeout)
98 void close() throw(nidas::util::IOException);
TCPSocketIODevice()
Create a TCPSocketIODevice.
Definition: TCPSocketIODevice.cc:36
TCPSocketIODevice & operator=(const TCPSocketIODevice &)
No assignment.
size_t read(void *buf, size_t len)
Read from the device.
Definition: TCPSocketIODevice.h:76
~TCPSocketIODevice()
Definition: TCPSocketIODevice.cc:42
A IODevice providing support for UDP and TCP sockets.
Definition: SocketIODevice.h:40
void open(int flags)
Open the socket, which does a socket connect to the remote address which is parsed from the contents ...
Definition: TCPSocketIODevice.cc:58
An IODevice consisting of a TCP socket.
Definition: TCPSocketIODevice.h:36
int getFd() const
Fetch the file descriptor associate with this socket.
Definition: Socket.h:617
int getKeepAliveIdleSecs() const
Definition: TCPSocketIODevice.h:115
void setTcpNoDelay(bool val)
Definition: TCPSocketIODevice.h:100
int getWriteFd() const
The file descriptor used when writing to this device.
Definition: TCPSocketIODevice.h:68
bool _tcpNoDelay
Definition: TCPSocketIODevice.h:130
int len
Definition: sing.cc:934
int _keepAliveIdleSecs
Definition: TCPSocketIODevice.h:132
Definition: IOException.h:37
int getReadFd() const
The file descriptor used when reading from this SocketIODevice.
Definition: TCPSocketIODevice.h:59
void close()
close the device.
Definition: TCPSocketIODevice.cc:47
nidas::util::Socket * _socket
The socket.
Definition: TCPSocketIODevice.h:128
A stream (TCP) socket.
Definition: Socket.h:430
size_t recv(void *buf, size_t len, int flags=0)
Definition: Socket.h:619
size_t send(const void *buf, size_t len, int flags=MSG_NOSIGNAL)
send data on socket, see man page for send system function.
Definition: Socket.h:630
size_t write(const void *buf, size_t len)
Write to the device.
Definition: TCPSocketIODevice.h:90
bool getTcpNoDelay()
Definition: TCPSocketIODevice.h:105
void setKeepAliveIdleSecs(int val)
Definition: TCPSocketIODevice.h:110
Definition: InvalidParameterException.h:35