18#ifndef _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H
19#define _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H
60 void bind(
int lport, InetAddressPtr laddress);
69 void connect(InetAddressPtr address,
int port);
72 inline InetAddressPtr getInetAddress()
const
99 return localPort != 0;
118 void send(DatagramPacketPtr& p);
124 apr_socket_t* socket;
129 InetAddressPtr address;
131 InetAddressPtr localAddress;
This class represents a socket for sending and receiving datagram packets.
Definition: datagramsocket.h:37
InetAddressPtr getLocalAddress() const
Gets the local address to which the socket is bound.
Definition: datagramsocket.h:78
int getPort() const
Returns the port for this socket.
Definition: datagramsocket.h:91
int getLocalPort() const
Returns the port number on the local host to which this socket is bound.
Definition: datagramsocket.h:85
bool isClosed() const
Returns wether the socket is closed or not.
Definition: datagramsocket.h:103
void receive(DatagramPacketPtr &p)
Receives a datagram packet from this socket.
bool isConnected() const
Returns the connection state of the socket.
Definition: datagramsocket.h:109
void send(DatagramPacketPtr &p)
Sends a datagram packet from this socket.
bool isBound() const
Returns the binding state of the socket.
Definition: datagramsocket.h:97
base class for java-like objects.
Definition: object.h:102
LOG4CXX_PTR_DEF(AppenderAttachableImpl)
Definition: messagehandler.h:23
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:153
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:26
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:147
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:141