Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XFcSocket Class Reference

NetworkCommBase, defines abstract socket layer for communication. More...

Inheritance diagram for XFcSocket:

Inheritance graph
[legend]
List of all members.

Public Member Functions

XFCIMPORT INT32 open (INT32 aProtocolFamily, INT32 aType, INT32 aProtocol)
 Opens a socket. Returns -1 if error or 0 if success.

XFCIMPORT void * getHandle ()
 Gets handle for device.

XFCIMPORT void setHandle (void *aSocket)
 Set handle for device - socket.

XFCIMPORT void close ()
 Release handle for reuse.

XFCIMPORT INT32 getLocalAddress (XFcAddress &)
 Gets local address. Returns -1 if error else 0.

XFCIMPORT INT32 getRemoteAddr (XFcAddress &)
 Gets remote address. Returns -1 if error else 0.

XFCIMPORT INT32 setOption (INT32 aLevel, INT32 aOptname, const void *aOptval, INT32 aOptlen)
 Sets socket options. Wrapper around setsockoption.

XFCIMPORT INT32 getOption (INT32 aLevel, INT32 aOptname, void *aOptval, INT32 *aOptlen)
 Gets socket options. Wrapper around getsockoption.

XFCIMPORT INT32 ioctl (INT32 aCmd, UINT32 *aArgp)
 Ioctl socket. Wrapper around ioctl socket command.

virtual XFCIMPORT ~XFcSocket ()
 Virtual destructor.


Protected Member Functions

 XFcSocket ()
 Protected constructor.


Protected Attributes

void * mSocket
 Socket handle.


Detailed Description

NetworkCommBase, defines abstract socket layer for communication.


Constructor & Destructor Documentation

virtual XFCIMPORT XFcSocket::~XFcSocket   [virtual]
 

Virtual destructor.

XFcSocket::XFcSocket   [protected]
 

Protected constructor.

Ensure abstract use of the class as there is no public static constructor.


Member Function Documentation

XFCIMPORT void XFcSocket::close  
 

Release handle for reuse.

Warning:
Socket object is not valid for reuse after caling close(). This behavior is inherited from epoc where close() function call means socket close and closing communication channel to socket server. After close() call XFcSocket class must be deleted.

XFCIMPORT void* XFcSocket::getHandle  
 

Gets handle for device.

Returns:
device handle - socket.

XFCIMPORT INT32 XFcSocket::getLocalAddress XFcAddress  
 

Gets local address. Returns -1 if error else 0.

XFCIMPORT INT32 XFcSocket::getOption INT32    aLevel,
INT32    aOptname,
void *    aOptval,
INT32   aOptlen
 

Gets socket options. Wrapper around getsockoption.

XFCIMPORT INT32 XFcSocket::getRemoteAddr XFcAddress  
 

Gets remote address. Returns -1 if error else 0.

XFCIMPORT INT32 XFcSocket::ioctl INT32    aCmd,
UINT32   aArgp
 

Ioctl socket. Wrapper around ioctl socket command.

XFCIMPORT INT32 XFcSocket::open INT32    aProtocolFamily,
INT32    aType,
INT32    aProtocol
 

Opens a socket. Returns -1 if error or 0 if success.

Wrapper around socket command. If socket is already created recall will close existing socket and create a new one.

XFCIMPORT void XFcSocket::setHandle void *    aSocket
 

Set handle for device - socket.

XFCIMPORT INT32 XFcSocket::setOption INT32    aLevel,
INT32    aOptname,
const void *    aOptval,
INT32    aOptlen
 

Sets socket options. Wrapper around setsockoption.


Member Data Documentation

void* XFcSocket::mSocket [protected]
 

Socket handle.


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch