18#ifndef _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H
19#define _LOG4CXX_HELPERS_DATAGRAM_SOCKET_H
40 LOG4CXX_DECLARE_PRIVATE_MEMBER_PTR(DatagramSocketPriv, m_priv)
53 virtual
void bind(
int lport, InetAddressPtr laddress) = 0;
59 virtual
void connect(InetAddressPtr address,
int port) = 0;
62 InetAddressPtr getInetAddress() const;
65 InetAddressPtr getLocalAddress() const;
69 int getLocalPort() const;
78 virtual
bool isClosed() const = 0;
81 bool isConnected() const;
84 virtual
void receive(DatagramPacketPtr& p) = 0;
87 virtual
void send(DatagramPacketPtr& p) = 0;
91 static DatagramSocketUniquePtr create();
95 static DatagramSocketUniquePtr create(
int port);
99 static DatagramSocketUniquePtr create(
int port, InetAddressPtr laddr);
This class represents a socket for sending and receiving datagram packets.
Definition: datagramsocket.h:38
base class for java-like objects.
Definition: object.h:106
LOG4CXX_UNIQUE_PTR_DEF(DatagramSocket)
LOG4CXX_PTR_DEF(Appender)
#define LOG4CXX_CAST_ENTRY(Interface)
Definition: object.h:158
#define DECLARE_ABSTRACT_LOG4CXX_OBJECT(object)
Definition: object.h:39
#define END_LOG4CXX_CAST_MAP()
Definition: object.h:152
#define BEGIN_LOG4CXX_CAST_MAP()
Definition: object.h:146