18 #ifndef _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H 19 #define _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H 21 #include <log4cxx/helpers/objectimpl.h> 22 #include <log4cxx/helpers/objectptr.h> 23 #include <log4cxx/helpers/inetaddress.h> 24 #include <log4cxx/helpers/pool.h> 25 #include <log4cxx/helpers/datagrampacket.h> 41 BEGIN_LOG4CXX_CAST_MAP()
43 END_LOG4CXX_CAST_MAP()
61 void bind(
int lport, InetAddressPtr laddress);
70 void connect(InetAddressPtr address,
int port);
100 return localPort != 0;
116 void receive(DatagramPacketPtr& p);
119 void send(DatagramPacketPtr& p);
125 apr_socket_t* socket;
130 InetAddressPtr address;
132 InetAddressPtr localAddress;
144 #endif //_LOG4CXX_HELPERS_DATAGRAM_SOCKET_H InetAddressPtr getLocalAddress() const
Gets the local address to which the socket is bound.
Definition: datagramsocket.h:79
InetAddressPtr getInetAddress() const
Returns the address to which this socket is connected.
Definition: datagramsocket.h:73
int getPort() const
Returns the port for this socket.
Definition: datagramsocket.h:92
int getLocalPort() const
Returns the port number on the local host to which this socket is bound.
Definition: datagramsocket.h:86
bool isConnected() const
Returns the connection state of the socket.
Definition: datagramsocket.h:110
bool isBound() const
Returns the binding state of the socket.
Definition: datagramsocket.h:98
bool isClosed() const
Returns wether the socket is closed or not.
Definition: datagramsocket.h:104
Implementation class for Object.
Definition: objectimpl.h:28
This class represents a socket for sending and receiving datagram packets.
Definition: datagramsocket.h:37
Definition: appender.h:33