class PIPDatagramSocket: public PIPSocket

Internet Protocol Datagram Socket class

Inheritance:


Public Methods

[more]virtual BOOL ReadFrom ( void * buf, PINDEX len, Address & addr, WORD & port )
Read a datagram from a remote computer.
[more]virtual BOOL WriteTo ( const void * buf, PINDEX len, const Address & addr, WORD port )
Write a datagram to a remote computer.

Protected Methods

[more] PIPDatagramSocket ()
Create a TCP/IP protocol socket channel.


Inherited from PIPSocket:

Public Classes

oclass Address: public in_addr
oclass RouteEntry: public PObject
oclass InterfaceEntry: public PObject

Public Methods

ovirtual PString GetName() const
ovirtual BOOL Connect( const PString & address )
ovirtual BOOL Listen( unsigned queueSize = 5, WORD port = 0, Reusability reuse = AddressIsExclusive )
ostatic PString GetHostName()
ostatic BOOL GetHostAddress( Address & addr )
ostatic PStringArray GetHostAliases( const PString & hostname )
ostatic BOOL IsLocalHost( const PString & hostname )
ovirtual BOOL GetLocalAddress( Address & addr )
ovirtual BOOL GetPeerAddress( Address & addr )
oPString GetLocalHostName()
oPString GetPeerHostName()
ostatic void ClearNameCache()
ostatic BOOL GetGatewayAddress( Address & addr )
ostatic PString GetGatewayInterface()
ostatic BOOL GetRouteTable( RouteTable & table )
ostatic BOOL GetInterfaceTable( InterfaceTable & table )


Inherited from PSocket:

Public

Socket establishment functions

Socket options functions

Port/Service database functions

Multiple socket selection functions

Integer conversion functions

Protected Fields

oWORD port

Protected Methods

ovirtual const char* GetProtocolName() const


Inherited from PChannel:

Public Methods

ostatic BOOL ConvertOSError( int libcReturnValue, Errors & lastError, int & osError )

Public

Construction

Overrides from class PObject

Information functions

Reading functions

Writing functions

Miscellaneous functions

Error functions

Protected Fields

oint os_handle
oErrors lastErrorCode[NumErrorGroups+1]
oint lastErrorNumber[NumErrorGroups+1]
oPINDEX lastReadCount
oPINDEX lastWriteCount
oPTimeInterval readTimeout
oPTimeInterval writeTimeout

Protected Methods

ovirtual BOOL ConvertOSError( int libcReturnValue, ErrorGroup group = LastGeneralError )
oBOOL SetErrorValues( Errors errorCode, int osError, ErrorGroup group = LastGeneralError )
oint ReadCharWithTimeout( PTimeInterval & timeout )


Inherited from PObject:

Public

Run Time Type functions

Comparison functions

I/O functions


Documentation

Internet Protocol Datagram Socket class
o PIPDatagramSocket()
Create a TCP/IP protocol socket channel. If a remote machine address or a "listening" socket is specified then the channel is also opened.

ovirtual BOOL ReadFrom( void * buf, PINDEX len, Address & addr, WORD & port )
Read a datagram from a remote computer.

Returns:
TRUE if any bytes were sucessfully read.
Parameters:
buf - Data to be written as URGENT TCP data.
len - Number of bytes pointed to by buf.
addr - Address from which the datagram was received.
port - Port from which the datagram was received.

ovirtual BOOL WriteTo( const void * buf, PINDEX len, const Address & addr, WORD port )
Write a datagram to a remote computer.

Returns:
TRUE if all the bytes were sucessfully written.
Parameters:
buf - Data to be written as URGENT TCP data.
len - Number of bytes pointed to by buf.
addr - Address to which the datagram is sent.
port - Port to which the datagram is sent.


Direct child classes:
PUDPSocket
PICMPSocket

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.