26#ifndef NIDAS_CORE_SERVERSOCKETIODEVICE_H
27#define NIDAS_CORE_SERVERSOCKETIODEVICE_H
35namespace nidas {
namespace core {
98 size_t read(
void *buf,
size_t len,
int msecTimeout)
132 "ioctl",
"not supported on SocketIODevice");
185 nidas::util::auto_ptr<nidas::util::SocketAddress>
_sockAddr;
An interface to an IO device.
Definition IODevice.h:42
virtual const std::string & getName() const
Definition IODevice.h:57
An IODevice supporting a TCP or UNIX server socket.
Definition ServerSocketIODevice.h:46
nidas::util::Socket * _socket
Definition ServerSocketIODevice.h:195
std::string _unixPath
Path name of AF_UNIX socket.
Definition ServerSocketIODevice.h:175
ServerSocketIODevice(const ServerSocketIODevice &)
No copying.
int _sockPort
Port number that is parsed from sensor name.
Definition ServerSocketIODevice.h:180
virtual ~ServerSocketIODevice()
Definition ServerSocketIODevice.cc:44
int _addrtype
The type of the destination address, AF_INET or AF_UNIX.
Definition ServerSocketIODevice.h:170
nidas::util::ServerSocket * _serverSocket
The listen socket.
Definition ServerSocketIODevice.h:193
ServerSocketIODevice & operator=(const ServerSocketIODevice &)
No assignment.
void closeServerSocket()
Definition ServerSocketIODevice.cc:61
ServerSocketIODevice()
Create a SocketIODevice.
Definition ServerSocketIODevice.cc:37
int getReadFd() const
The file descriptor used when reading from this SocketIODevice.
Definition ServerSocketIODevice.h:61
nidas::util::auto_ptr< nidas::util::SocketAddress > _sockAddr
The destination socket address.
Definition ServerSocketIODevice.h:185
int getWriteFd() const
The file descriptor used when writing to this sensor.
Definition ServerSocketIODevice.h:70
void open(int flags)
Open the socket.
Definition ServerSocketIODevice.cc:69
size_t write(const void *buf, size_t len)
Write to the sensor.
Definition ServerSocketIODevice.h:118
bool getTcpNoDelay()
Definition ServerSocketIODevice.h:153
void close()
close the sensor (and any associated FIFOs).
Definition ServerSocketIODevice.cc:50
bool _tcpNoDelay
Definition ServerSocketIODevice.h:197
void ioctl(int, void *, size_t)
Perform an ioctl on the device.
Definition ServerSocketIODevice.h:129
size_t read(void *buf, size_t len)
Read from the sensor.
Definition ServerSocketIODevice.h:88
size_t read(void *buf, size_t len, int msecTimeout)
Read from the sensor with a timeout in milliseconds.
Definition ServerSocketIODevice.h:98
void setTcpNoDelay(bool val)
Definition ServerSocketIODevice.h:145
Definition IOException.h:37
A stream (TCP) socket that is used to listen for connections.
Definition Socket.h:981
A stream (TCP) socket.
Definition Socket.h:573
size_t recv(void *buf, size_t len, int flags=0)
Definition Socket.h:813
int getFd() const
Fetch the file descriptor associate with this socket.
Definition Socket.h:805
void setTimeout(int val)
Set the timeout for receive(), recv(), and recvfrom() methods.
Definition Socket.h:649
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:826
Sample * getSample(sampleType type, unsigned int len)
A convienence method for getting a sample of an enumerated type from a pool.
Definition Sample.cc:70
Root namespace for the NCAR In-Situ Data Acquisition Software.
Definition A2DConverter.h:31
int len
Definition sing.cc:948