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

# XFcUdpEngine Class Reference

XFcUdpEngine is interface for UDP open and close engine. More...

Inheritance diagram for XFcUdpEngine:

[legend]
List of all members.

## Public Types
enum | XFCNET_UDP_CONNECTION { XFCNET_UDP_OPEN = -2, XFCNET_UDP_CLOSE = -3 }
| States that UDP engine can handle. More...
## Public Member Functions
virtual | ~XFcUdpEngine ()
| Virtual destructor, does nothing.
virtual void | open (XFcCommunicationHandler &aCommHandler, INT32 aSendMtu, INT32 aRecvMtu)=0
| Opens UdpEngine.
virtual void | close (XFcCommunicationHandler &aCommHandler)=0
| Closes UdpEngine.
virtual INT | send (XFcClientCommWin *aClientCommWin)=0
| Sends data to given client.
virtual INT | recv (XFcCommunicationHandler &aCommHandler, XFcObjectPacketBase **aBase, INT32 &aIndex)=0
| Receives data from udp port.
virtual INT | getState ()=0
| Gets current XFcUdpEngine state.
## Protected Member Functions
const XFcAddress *const | getRecvAddress (XFcCommunicationHandler &aCommHandler) const
| Gets recv address.
void | changeUdpEngine (XFcCommunicationHandler &aCommHandler, XFcUdpEngine *aEngine)
| Changes udp engine.
| XFcUdpEngine ()
| Protected constructor.

## Detailed Description

XFcUdpEngine is interface for UDP open and close engine.

## Member Enumeration Documentation

enum XFcUdpEngine::XFCNET_UDP_CONNECTION

  | States that UDP engine can handle. Enumeration values:
  XFCNET_UDP_OPEN | UDP socket is open.
  XFCNET_UDP_CLOSE | UDP socket is closed.

## Constructor & Destructor Documentation

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

| Protected constructor.

virtual XFcUdpEngine::~XFcUdpEngine | ( |  | ) | `[virtual]`

| Virtual destructor, does nothing.

## Member Function Documentation

void XFcUdpEngine::changeUdpEngine | ( | XFcCommunicationHandler & | aCommHandler,
|  | XFcUdpEngine * | aEngine
| ) | `[protected]`

| Changes udp engine.

virtual void XFcUdpEngine::close | ( | XFcCommunicationHandler & | aCommHandler | ) | `[pure virtual]`

  | Closes UdpEngine. Parameters:
  aCommHandler | communication handler.
Note: Will release XFcUdpEngine resources. Implemented in XFcUdpOpenEngine, and XFcUdpCloseEngine.

const XFcAddress* const XFcUdpEngine::getRecvAddress | ( | XFcCommunicationHandler & | aCommHandler | ) | const`[protected]`

  | Gets recv address. Parameters:
  aCommHandler | reference to udp manager.
Returns: pointer to address.

virtual INT XFcUdpEngine::getState | ( |  | ) | `[pure virtual]`

| Gets current XFcUdpEngine state. Returns: current engine state, check XFCNET_UDP_CONNECTION. Implemented in XFcUdpOpenEngine, and XFcUdpCloseEngine.

virtual void XFcUdpEngine::open | ( | XFcCommunicationHandler & | aCommHandler,
|  | INT32 | aSendMtu,
|  | INT32 | aRecvMtu
| ) | `[pure virtual]`

  | Opens UdpEngine. Parameters:
  aCommHandler | communication handler that holds client that are going to send or receive data.
Note: If open fails state will change. Implemented in XFcUdpOpenEngine, and XFcUdpCloseEngine.

virtual INT XFcUdpEngine::recv | ( | XFcCommunicationHandler & | aCommHandler,
|  | XFcObjectPacketBase ** | aBase,
|  | INT32 & | aIndex
| ) | `[pure virtual]`

  | Receives data from udp port. Parameters:
  aCommHandler | communication handler base. It is used for client address resolving.
  aBase | pointer for received data packet.
  aIndex | client index to XFcCommunicationHandler array.
Returns: number of received bytes if successful, or XFCNET_ERROR if unsuccessful. Implemented in XFcUdpOpenEngine, and XFcUdpCloseEngine.

virtual INT XFcUdpEngine::send | ( | XFcClientCommWin * | aClientCommWin | ) | `[pure virtual]`

  | Sends data to given client. Parameters:
  aClientCommWin | client where data is going to send.
Returns: number of sent bytes if successful, or XFCNET_ERROR if unsuccessful. Implemented in XFcUdpOpenEngine, and XFcUdpCloseEngine.

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