26 #ifndef NIDAS_CORE_SERVERSOCKETIODEVICE_H
27 #define NIDAS_CORE_SERVERSOCKETIODEVICE_H
35 namespace nidas {
namespace core {
119 void ioctl(
int,
void*,
size_t) throw(nidas::util::IOException)
122 "ioctl",
"not supported on SocketIODevice");
128 void close() throw(nidas::util::IOException);
164 nidas::util::auto_ptr<nidas::util::SocketAddress>
_sockAddr;
182 ServerSocketIODevice& operator=(const ServerSocketIODevice&);
Implementation of an IOChannel, over a ServerSocket.
Definition: Socket.h:297
bool getTcpNoDelay()
Definition: ServerSocketIODevice.h:135
size_t read(void *buf, size_t len, int msecTimeout)
Read from the sensor with a timeout in milliseconds.
Definition: ServerSocketIODevice.h:92
nidas::util::ServerSocket * _serverSocket
The listen socket.
Definition: ServerSocketIODevice.h:172
void setTimeout(int val)
Set the timeout for receive(), recv(), and recvfrom() methods.
Definition: Socket.h:493
ServerSocketIODevice()
Create a SocketIODevice.
Definition: ServerSocketIODevice.cc:37
virtual ~ServerSocketIODevice()
Definition: ServerSocketIODevice.cc:44
size_t read(void *buf, size_t len)
Read from the sensor.
Definition: ServerSocketIODevice.h:84
virtual const std::string & getName() const
Definition: IODevice.h:57
int _sockPort
Port number that is parsed from sensor name.
Definition: ServerSocketIODevice.h:159
int getFd() const
Fetch the file descriptor associate with this socket.
Definition: Socket.h:617
int getWriteFd() const
The file descriptor used when writing to this sensor.
Definition: ServerSocketIODevice.h:70
size_t write(const void *buf, size_t len)
Write to the sensor.
Definition: ServerSocketIODevice.h:110
void setTcpNoDelay(bool val)
Definition: ServerSocketIODevice.h:130
std::string _unixPath
Path name of AF_UNIX socket.
Definition: ServerSocketIODevice.h:154
nidas::util::Socket * _socket
Definition: ServerSocketIODevice.h:174
nidas::util::auto_ptr< nidas::util::SocketAddress > _sockAddr
The destination socket address.
Definition: ServerSocketIODevice.h:164
bool _tcpNoDelay
Definition: ServerSocketIODevice.h:176
An interface to an IO device.
Definition: IODevice.h:41
int len
Definition: sing.cc:934
int _addrtype
The type of the destination address, AF_INET or AF_UNIX.
Definition: ServerSocketIODevice.h:149
An IODevice supporting a TCP or UNIX server socket.
Definition: ServerSocketIODevice.h:46
Definition: IOException.h:37
Implementation of an IOChannel, over a Socket.
Definition: Socket.h:45
void closeServerSocket()
Definition: ServerSocketIODevice.cc:61
void open(int flags)
open the socket.
Definition: ServerSocketIODevice.cc:69
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
void ioctl(int, void *, size_t)
Definition: ServerSocketIODevice.h:119
void close()
close the sensor (and any associated FIFOs).
Definition: ServerSocketIODevice.cc:50
int getReadFd() const
The file descriptor used when reading from this SocketIODevice.
Definition: ServerSocketIODevice.h:61
Definition: InvalidParameterException.h:35