Apache Log4cxx  Version 1.8.0
Loading...
Searching...
No Matches
log4cxx::helpers::Socket Class Referenceabstract

Abstract base class for an outgoing socket connection. More...

#include <socket.h>

Inheritance diagram for log4cxx::helpers::Socket:
log4cxx::helpers::Object

Public Member Functions

virtual ~Socket ()
virtual size_t write (ByteBuffer &)=0
virtual void close ()=0
 Close this socket.
InetAddressPtr getInetAddress () const
 Returns the value of this socket's address field.
int getPort () const
 Returns the value of this socket's port field.
void setAttributes (const InetAddressPtr &newAddress, int newPort)
 Use newAddress and newPort as the destination.
Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
virtual const helpers::ClassgetClass () const =0
virtual bool instanceof (const Class &clazz) const =0
virtual const void * cast (const Class &clazz) const =0

Static Public Member Functions

static SocketUniquePtr create (InetAddressPtr &address, int port)
 Create a concrete instance of this class.
static SocketUniquePtr create (LOG4CXX_16_CONST InetAddressPtr &address, int port, const LogString &concreteClassName)

Protected Member Functions

 Socket (LOG4CXX_PRIVATE_PTR(SocketPrivate) priv)

Detailed Description

Abstract base class for an outgoing socket connection.

A socket is an endpoint for communication between two network connected machines or processes.

Constructor & Destructor Documentation

◆ Socket()

log4cxx::helpers::Socket::Socket ( LOG4CXX_PRIVATE_PTR(SocketPrivate) priv)
protected

◆ ~Socket()

virtual log4cxx::helpers::Socket::~Socket ( )
virtual

Member Function Documentation

◆ close()

virtual void log4cxx::helpers::Socket::close ( )
pure virtual

Close this socket.

◆ create() [1/2]

SocketUniquePtr log4cxx::helpers::Socket::create ( InetAddressPtr & address,
int port )
static

Create a concrete instance of this class.

◆ create() [2/2]

SocketUniquePtr log4cxx::helpers::Socket::create ( LOG4CXX_16_CONST InetAddressPtr & address,
int port,
const LogString & concreteClassName )
static

◆ getInetAddress()

InetAddressPtr log4cxx::helpers::Socket::getInetAddress ( ) const

Returns the value of this socket's address field.

◆ getPort()

int log4cxx::helpers::Socket::getPort ( ) const

Returns the value of this socket's port field.

◆ setAttributes()

void log4cxx::helpers::Socket::setAttributes ( const InetAddressPtr & newAddress,
int newPort )

Use newAddress and newPort as the destination.

◆ write()

virtual size_t log4cxx::helpers::Socket::write ( ByteBuffer & )
pure virtual

The documentation for this class was generated from the following file: