27 #ifndef NIDAS_CORE_MCSOCKET_H
28 #define NIDAS_CORE_MCSOCKET_H
37 namespace nidas {
namespace core {
82 virtual
void connected(nidas::util::
Socket* sock,const nidas::util::Inet4PacketInfoX& pktinfo);
119 size_t read(
void*,
size_t) throw (nidas::util::IOException)
130 size_t write(
const void*,
size_t) throw (nidas::util::IOException)
141 size_t write(
const struct iovec*,
int) throw (nidas::util::IOException)
147 void close() throw (nidas::util::IOException);
152 throw(nidas::util::InvalidParameterException);
160 _outer->connected(sock,pktinfo);
int getKeepAliveIdleSecs() const
Definition: McSocket.h:93
McSocket & operator=(const McSocket &)
No assignment.
size_t write(const struct iovec *, int)
A McSocket shouldn't be used to do any actual reads or writes, it just sets up the connection...
Definition: McSocket.h:141
McSocket()
Constructor.
Definition: McSocket.cc:41
virtual void connected(nidas::util::Socket *sock, const nidas::util::Inet4PacketInfoX &pktinfo)
Definition: McSocket.cc:95
McSocketRequest
Definition: Datagrams.h:34
IOChannelRequester * _iochanRequester
Definition: McSocket.h:186
std::string _name
Definition: McSocket.h:192
void setNonBlocking(bool val)
Do setNonBlocking(val) on underlying socket.
Definition: McSocket.h:101
void setRequestType(enum McSocketRequest val)
Definition: McSocket.h:57
MyMcSocket _mcsocket
Definition: McSocket.h:188
bool isRequester() const
Does this McSocket request connections, or does it listen for incoming connections.
Definition: McSocket.h:69
A IP version 4 socket address, containing a host address, and a port number.
Definition: Inet4SocketAddress.h:41
const nidas::util::Inet4SocketAddress & getInet4McastSocketAddress() const
Definition: McSocket.h:173
const std::string & getName() const
Definition: McSocket.h:75
bool _nonBlocking
Definition: McSocket.h:202
const Inet4SocketAddress & getInet4McastSocketAddress() const
Get the multicast address for listening to requests.
Definition: McSocket.h:323
bool _firstRead
Definition: McSocket.h:196
Definition: Inet4PacketInfo.h:92
void connected(nidas::util::Socket *sock, const nidas::util::Inet4PacketInfoX &pktinfo)
Virtual method that is called when a socket connection is established.
Definition: McSocket.h:158
McSocket * clone() const
Derived classes must provide clone.
Definition: McSocket.cc:60
A channel for Input or Output of data.
Definition: IOChannel.h:64
virtual bool isNewInput() const
Some IOChannels, namely FileSet, which opens successive files, need to indicate when a read is from t...
Definition: McSocket.h:84
nidas::core::McSocket * _outer
Definition: McSocket.h:163
int _keepAliveIdleSecs
Definition: McSocket.h:200
void requestConnection(IOChannelRequester *service)
After the IOChannel is configured, a user of IOChannel calls requestConnection to get things started...
Definition: McSocket.cc:87
~McSocket()
Definition: McSocket.h:52
bool isNonBlocking() const
Return isNonBlocking() of underlying socket.
Definition: McSocket.h:109
size_t read(void *, size_t)
A McSocket shouldn't be used to do any actual reads or writes, it just sets up the connection...
Definition: McSocket.h:119
int getFd() const
Definition: McSocket.cc:119
void setInet4McastSocketAddress(const nidas::util::Inet4SocketAddress &val)
Definition: McSocket.h:168
bool _amRequester
Definition: McSocket.h:194
Definition: IOException.h:37
Implementation of an IOChannel, over a Socket.
Definition: Socket.h:45
void setRequester(bool val)
Definition: McSocket.h:71
enum McSocketRequest getRequestType() const
Definition: McSocket.h:61
A stream (TCP) socket.
Definition: Socket.h:430
void fromDOMElement(const xercesc::DOMElement *)
Initialize myself from a xercesc::DOMElement.
Definition: McSocket.cc:124
bool _newInput
Definition: McSocket.h:198
Definition: McSocket.h:154
void close()
Definition: McSocket.cc:113
IOChannel * connect()
Establish a connection.
Definition: McSocket.cc:65
Implementation of an IOChannel, using nidas::util::McSocket<nidas::util::Socket> to establish a TCP c...
Definition: McSocket.h:43
size_t write(const void *, size_t)
A McSocket shouldn't be used to do any actual reads or writes, it just sets up the connection...
Definition: McSocket.h:130
void setRequestType(int val)
Set the request type value.
Definition: McSocket.h:340
int getRequestType() const
Get the request type number.
Definition: McSocket.h:345
void setInet4McastSocketAddress(const Inet4SocketAddress &val)
Set the multicast address for listening to requests.
Definition: McSocket.h:332
Interface for an object that requests connections to Inputs or Outputs.
Definition: IOChannel.h:54
MyMcSocket(nidas::core::McSocket *s)
Definition: McSocket.h:157
void setName(const std::string &val)
Definition: McSocket.h:73
void setKeepAliveIdleSecs(int val)
Definition: McSocket.h:88