PTLib  Version 2.14.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
XMPP::C2S::TCPTransport Class Reference

XMPP client to server TCP transport. More...

#include <xmpp_c2s.h>

Inheritance diagram for XMPP::C2S::TCPTransport:
Collaboration diagram for XMPP::C2S::TCPTransport:

Public Member Functions

 TCPTransport (const PString &hostname)
 
 TCPTransport (const PString &hostname, WORD port)
 
 ~TCPTransport ()
 
const PStringGetServerHost () const
 
WORD GetServerPort () const
 
virtual PBoolean Open ()
 
virtual PBoolean Close ()
 Close the channel. More...
 

Protected Attributes

PString m_Hostname
 
WORD m_Port
 
PTCPSocketm_Socket
 

Additional Inherited Members

- Public Types inherited from PChannel
enum  PXBlockType { PXReadBlock, PXWriteBlock, PXAcceptBlock, PXConnectBlock }
 
enum  Errors {
  NoError, NotFound, FileExists, DiskFull,
  AccessDenied, DeviceInUse, BadParameter, NoMemory,
  NotOpen, Timeout, Interrupted, BufferTooSmall,
  Miscellaneous, ProtocolFailure, Unavailable, NumNormalisedErrors
}
 Normalised error codes. More...
 
enum  ErrorGroup { LastReadError, LastWriteError, LastGeneralError, NumErrorGroups }
 Error groups. More...
 
typedef PNotifierTemplate
< PChannel::AsyncContext & > 
AsyncNotifier
 
enum  ShutdownValue { ShutdownRead = 0, ShutdownWrite = 1, ShutdownReadAndWrite = 2 }
 
- Static Public Member Functions inherited from PChannel
static PString GetErrorText (Errors lastError, int osError=0)
 Get error message description. More...
 
- Static Public Member Functions inherited from PObject
static const char * Class ()
 Get the name of the class as a C string. More...
 
static __inline const PObjectPTraceObjectInstance (const char *)
 
static __inline const PObjectPTraceObjectInstance (const PObject *obj)
 
static Comparison InternalCompareObjectMemoryDirect (const PObject *obj1, const PObject *obj2, PINDEX size)
 Internal function caled from CompareObjectMemoryDirect() More...
 
- Protected Member Functions inherited from PIndirectChannel
virtual PBoolean OnOpen ()
 This callback is executed when the Open() function is called with open channels. More...
 
- Friends inherited from PObject

Detailed Description

XMPP client to server TCP transport.

Constructor & Destructor Documentation

XMPP::C2S::TCPTransport::TCPTransport ( const PString hostname)
XMPP::C2S::TCPTransport::TCPTransport ( const PString hostname,
WORD  port 
)
XMPP::C2S::TCPTransport::~TCPTransport ( )

Member Function Documentation

virtual PBoolean XMPP::C2S::TCPTransport::Close ( )
virtual

Close the channel.

This will detach itself from the read and write channels and delete both of them if they are auto delete.

Returns
true if the channel is closed.

Implements XMPP::Transport.

const PString& XMPP::C2S::TCPTransport::GetServerHost ( ) const
inline

References m_Hostname.

WORD XMPP::C2S::TCPTransport::GetServerPort ( ) const
inline

References m_Port.

virtual PBoolean XMPP::C2S::TCPTransport::Open ( )
virtual

Implements XMPP::Transport.

Member Data Documentation

PString XMPP::C2S::TCPTransport::m_Hostname
protected

Referenced by GetServerHost().

WORD XMPP::C2S::TCPTransport::m_Port
protected

Referenced by GetServerPort().

PTCPSocket* XMPP::C2S::TCPTransport::m_Socket
protected

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