XFcClientStreamSocket class Reference

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

# XFcClientStreamSocket Class Reference

Network socket stream communication, "client" side connection. More...

Inheritance diagram for XFcClientStreamSocket:

[legend]
Collaboration diagram for XFcClientStreamSocket:

[legend]
List of all members.

## Public Member Functions

virtual XFCIMPORT | ~XFcClientStreamSocket ()
| Virtual destructor.
XFCIMPORT INT32 | Open (XFcAddress *aAddress)
| Opens connection to given address.
XFCIMPORT INT32 | Send (const CHAR8 *aBuf, INT32 aLen, INT32 aFlags)
| Sends data to address where connected.
XFCIMPORT INT32 | Recv (CHAR8 *aBuf, INT32 aLen, INT32 aFlags)
| Receives aLen bytes data from connected socket.
XFCIMPORT INT32 | Shutdown (INT32 aHow)
| Disables send or receive operations on a socket.
XFCIMPORT INT32 | Connect (XFcAddress *aAddress=NULL)
| Connects the socket to host.

## Static Public Member Functions

XFCIMPORT XFcClientStreamSocket * | New ()
| Static constructor.

## Protected Member Functions

| XFcClientStreamSocket ()
| Protected constructor.

## Private Attributes

XFcAddress * | mAddr
| Network address where to connect.

## Detailed Description

Network socket stream communication, "client" side connection.

## Constructor & Destructor Documentation

XFcClientStreamSocket::XFcClientStreamSocket | ( |  | ) | `[protected]`

| Protected constructor.

virtual XFCIMPORT XFcClientStreamSocket::~XFcClientStreamSocket | ( |  | ) | `[virtual]`

| Virtual destructor.

## Member Function Documentation

XFCIMPORT INT32 XFcClientStreamSocket::Connect | ( | XFcAddress * | aAddress = NULL | ) |

Connects the socket to host.

If socket is connected, new address reconnects socket to the new address.

Parameters:

  aAddress | address where to connect.

XFCIMPORT XFcClientStreamSocket* XFcClientStreamSocket::New | ( |  | ) | `[static]`

| Static constructor.

XFCIMPORT INT32 XFcClientStreamSocket::Open | ( | XFcAddress * | aAddress | ) |

| Opens connection to given address.

XFCIMPORT INT32 XFcClientStreamSocket::Recv | ( | CHAR8 * | aBuf,
|  | INT32 | aLen,
|  | INT32 | aFlags
| ) |

Receives aLen bytes data from connected socket.

Parameters:

  aBuf | receive data buffer.
  aLen | length of receive data buffer.
  aFlags | receive flags.

Returns:
  number of received bytes if successful, or -1 otherwise.

XFCIMPORT INT32 XFcClientStreamSocket::Send | ( | const CHAR8 * | aBuf,
|  | INT32 | aLen,
|  | INT32 | aFlags
| ) |

Sends data to address where connected.

Parameters:

  aBuf | data to send.
  aLen | bytes to send.
  aFlags | send flags.

Returns:
  number of sent bytes if successful, or -1 otherwise.

XFCIMPORT INT32 XFcClientStreamSocket::Shutdown | ( | INT32 | aHow | ) |

Disables send or receive operations on a socket.

Note:
  Doesn't release any system resources used by the socket.

## Member Data Documentation

XFcAddress* XFcClientStreamSocket::mAddr`[private]`

| Network address where to connect.

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