XFcL2CAPSocket class Reference

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

# XFcL2CAPSocket Class Reference

Interface to L2CAP socket bluetooth socket layer. More...

Inheritance diagram for XFcL2CAPSocket:

[legend]
Collaboration diagram for XFcL2CAPSocket:

[legend]
List of all members.

## Public Member Functions

XFCIMPORT INT | open (const XFcAddress &aAddress, XFcAsyncCallBack *aCallBack=NULL)
| Opens connection to destination address.
XFCIMPORT INT | open (XFcSocket &aSocket, XFcAsyncCallBack *aCallBack=NULL)
| Listens connection from other device.
XFCIMPORT INT | bind (XFcAddress &aAddress)
| Binds the socket if used as server.
XFCIMPORT INT | listen (INT aListen)
| Sets up a socket to listen for incoming connections.
XFCIMPORT INT32 | recv (CHAR8 *aData, INT aLen, INT aFlags)
| Receives data from socket, not supported if socket is in listen mode.
XFCIMPORT INT32 | send (const CHAR8 *aData, INT aLen, INT aFlags)
| Sends data to socket, not supported if socket is in listen mode.
virtual XFCIMPORT | ~XFcL2CAPSocket ()
| Virtual destructor.

## Static Public Member Functions

XFCIMPORT XFcL2CAPSocket * | create (INT aPlank=0)
| Creates L2CAPSocket.

## Protected Member Functions

| XFcL2CAPSocket ()
INT | init (INT aPlank)
| Initializes XFcL2CAPSocket.

## Detailed Description

Interface to L2CAP socket bluetooth socket layer.

Note:
  You do not need this at all.

## Constructor & Destructor Documentation

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

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

| Virtual destructor.

## Member Function Documentation

XFCIMPORT INT XFcL2CAPSocket::bind | ( | XFcAddress & | aAddress | ) |

Binds the socket if used as server.

Parameters:

  aAddress | is the address where to bind (only port is needed).

Returns:
  0 if successful, or -1 if unsuccessful.

XFCIMPORT XFcL2CAPSocket* XFcL2CAPSocket::create | ( | INT | aPlank = 0 | ) | `[static]`

Creates L2CAPSocket.

Returns:
  returns XFcL2CAPSocket if successful, or NULL if unsuccessful.

INT XFcL2CAPSocket::init | ( | INT | aPlank | ) | `[protected]`

Initializes XFcL2CAPSocket.

Returns:
  1 if successful, or 0 otherwise.

XFCIMPORT INT XFcL2CAPSocket::listen | ( | INT | aListen | ) |

| Sets up a socket to listen for incoming connections. Creates backbuffer for incoming connection.

XFCIMPORT INT XFcL2CAPSocket::open | ( | XFcSocket & | aSocket,
|  | XFcAsyncCallBack * | aCallBack = NULL
| ) |

Listens connection from other device.

Parameters:

  aSocket | socket to listen.
  aAddress | callback object.

Returns:
  0 if successful, or -1 if unsuccessful.

XFCIMPORT INT XFcL2CAPSocket::open | ( | const XFcAddress & | aAddress,
|  | XFcAsyncCallBack * | aCallBack = NULL
| ) |

Opens connection to destination address.

Parameters:

  aAddress | holds address where to connect.

Returns:
  0 if successful, or -1 if unsuccessful.

XFCIMPORT INT32 XFcL2CAPSocket::recv | ( | CHAR8 * | aData,
|  | INT | aLen,
|  | INT | aFlags
| ) |

Receives data from socket, not supported if socket is in listen mode.

Parameters:

  aData | buffer for the incoming data.
  aLen | length of buffer.
  aFlags | receive flags.

Returns:
  length of read data if successful, or -1 if unsuccessful.

XFCIMPORT INT32 XFcL2CAPSocket::send | ( | const CHAR8 * | aData,
|  | INT | aLen,
|  | INT | aFlags
| ) |

Sends data to socket, not supported if socket is in listen mode.

Parameters:

  aData | buffer for outgoing data.
  aLen | length of buffer.
  aFlags | send flags.

Returns:
  length of sent data if successful, or -1 if unsuccessful.

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