27 #ifndef NIDAS_CORE_MCSOCKETUDP_H
28 #define NIDAS_CORE_MCSOCKETUDP_H
37 namespace nidas {
namespace core {
116 size_t read(
void*,
size_t) throw (nidas::util::IOException)
127 size_t write(
const void*,
size_t) throw (nidas::util::IOException)
138 size_t write(
const struct iovec*,
int) throw (nidas::util::IOException)
144 void close() throw (nidas::util::IOException);
149 throw(nidas::util::InvalidParameterException);
158 _outer->connected(sock,pktinfo);
Implementation of an IOChannel, using nidas::util::McSocket<nidas::util::DatagramSocket> to establish...
Definition: McSocketUDP.h:46
IOChannelRequester * _iochanRequester
Definition: McSocketUDP.h:180
virtual bool isNewInput() const
Some IOChannels, namely FileSet, which opens successive files, need to indicate when a read is from t...
Definition: McSocketUDP.h:90
void setRequester(bool val)
Definition: McSocketUDP.h:79
enum McSocketRequest getRequestType() const
Definition: McSocketUDP.h:69
bool _nonBlocking
Definition: McSocketUDP.h:194
const nidas::util::Inet4SocketAddress & getInet4McastSocketAddress() const
Definition: McSocketUDP.h:173
A socket for sending or receiving datagrams, either unicast, broadcast or multicast.
Definition: Socket.h:912
std::string _name
Definition: McSocketUDP.h:186
McSocketRequest
Definition: Datagrams.h:34
size_t write(const struct iovec *, int)
A McSocketUDP shouldn't be used to do any actual reads or writes, it just sets up the connection...
Definition: McSocketUDP.h:138
A IP version 4 socket address, containing a host address, and a port number.
Definition: Inet4SocketAddress.h:41
void setInet4McastSocketAddress(const nidas::util::Inet4SocketAddress &val)
Definition: McSocketUDP.h:168
virtual void connected(nidas::util::DatagramSocket *sock, const nidas::util::Inet4PacketInfoX &pktinfo)
Definition: McSocketUDP.cc:86
void close()
Definition: McSocketUDP.cc:100
int getFd() const
Definition: McSocketUDP.cc:106
Definition: McSocketUDP.h:151
void setNonBlocking(bool val)
Do setNonBlocking(val) on underlying socket.
Definition: McSocketUDP.h:98
const Inet4SocketAddress & getInet4McastSocketAddress() const
Get the multicast address for listening to requests.
Definition: McSocket.h:323
Definition: Inet4PacketInfo.h:92
void setName(const std::string &val)
Definition: McSocketUDP.h:81
MyMcSocket _mcsocket
Definition: McSocketUDP.h:182
A channel for Input or Output of data.
Definition: IOChannel.h:64
void fromDOMElement(const xercesc::DOMElement *)
Initialize myself from a xercesc::DOMElement.
Definition: McSocketUDP.cc:111
~McSocketUDP()
Definition: McSocketUDP.h:61
McSocketUDP()
Constructor.
Definition: McSocketUDP.cc:37
Implementation of an IOChannel, over a DatagramSocket.
Definition: DatagramSocket.h:44
nidas::core::McSocketUDP * _outer
Definition: McSocketUDP.h:161
bool isNonBlocking() const
Return isNonBlocking() of underlying socket.
Definition: McSocketUDP.h:106
void setRequestType(enum McSocketRequest val)
Definition: McSocketUDP.h:65
const std::string & getName() const
Definition: McSocketUDP.h:83
void requestConnection(IOChannelRequester *service)
After the IOChannel is configured, a user of IOChannel calls requestConnection to get things started...
Definition: McSocketUDP.cc:78
McSocketUDP * clone() const
Derived classes must provide clone.
Definition: McSocketUDP.cc:55
Definition: IOException.h:37
bool isRequester() const
Does this McSocket request connections, or does it listen for incoming connections.
Definition: McSocketUDP.h:77
bool _newInput
Definition: McSocketUDP.h:192
void connected(nidas::util::DatagramSocket *sock, const nidas::util::Inet4PacketInfoX &pktinfo)
Virtual method that is called when a socket connection is established.
Definition: McSocketUDP.h:155
McSocketUDP & operator=(const McSocketUDP &)
No assignment.
size_t write(const void *, size_t)
A McSocketUDP shouldn't be used to do any actual reads or writes, it just sets up the connection...
Definition: McSocketUDP.h:127
bool _amRequester
Definition: McSocketUDP.h:188
Implementation of an IOChannel, using nidas::util::McSocket<nidas::util::Socket> to establish a TCP c...
Definition: McSocket.h:43
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
MyMcSocket(nidas::core::McSocketUDP *s)
Definition: McSocketUDP.h:154
Interface for an object that requests connections to Inputs or Outputs.
Definition: IOChannel.h:54
IOChannel * connect()
Establish a connection.
Definition: McSocketUDP.cc:60
size_t read(void *, size_t)
A McSocketUDP shouldn't be used to do any actual reads or writes, it just sets up the connection...
Definition: McSocketUDP.h:116
bool _firstRead
Definition: McSocketUDP.h:190