XFcInetHandler class Reference

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

# XFcInetHandler Class Reference

XFcInetHandler responsipility is handle data flow throught UDP socket. More...

Inheritance diagram for XFcInetHandler:

[legend]
Collaboration diagram for XFcInetHandler:

[legend]
List of all members.

## Public Member Functions

XFCIMPORT void | openService ()
| Opens communication service.
virtual XFCIMPORT void | closeService ()
| Closes service, inherited from XFcCommunicationHandler.
XFCIMPORT INT32 | verifySender (XFcAddress *aAddress) const
| Verifies incoming packet sender address.
virtual XFCIMPORT INT32 | incoming ()
| Handles incoming data. Inherited from XFcCommunicationHandler.
virtual XFCIMPORT INT32 | outgoing ()
| Handles outgoing data. Inherited from XFcCommunicationHandler.
XFCIMPORT void | setPort (UINT16 aPort)
| Sets UDP packet port.
virtual XFCIMPORT void | unknownSender (const XFcAddress *aAddress, XFcObjectPacketBase *aPacket)
| Handles unknown sender packet.
virtual XFCIMPORT void | checkActivity ()
| Checks client activity.
virtual XFCIMPORT | ~XFcInetHandler ()
| Destructor.

## Static Public Member Functions

XFCIMPORT XFcInetHandler * | create (UINT16 aListenPort, INT32 aSendMtu=XFCNET_MAXBUFFERSIZE, INT32 aRecvMtu=XFCNET_LISTENBUFFERSIZE)
| Static constructor.
XFCIMPORT XFcInetHandler * | create (INT32 aSendMtu=XFCNET_MAXBUFFERSIZE, INT32 aRecvMtu=XFCNET_LISTENBUFFERSIZE)
| Static constructor.

## Protected Member Functions

XFCIMPORT void | changeUdpEngine (XFcUdpEngine *aNewEngine)
| Changes udp state.
XFCIMPORT void | countNextPacketTime (INT aPacketSize)
| Counts next packet time.
XFCIMPORT INT | init (UINT16 aListenPort, INT32 aSendMtu, INT32 aRecvMtu)
| Initializes.
XFCIMPORT | XFcInetHandler ()
| Protected constructor.

## Private Attributes

XFcClientInetCommWinPriHelp | mPriorityHelp
| Holds priority help for priorized object.
XFcPriorityList< XFcClientCommWin * > | mBandwidthPriority
| Holds bandwidth priority list.
UINT32 | mNextPacketTime
UINT32 | mPrevPacketTime
XFcInetAddress * | mAcceptAddress
| Holds accept data from address.
INT32 | mSendMtu
| Holds maximum mtu for sendable packet.
INT32 | mRecvMtu
| Holds maximum mtu for received packet.
XFcUdpEngine * | mUdpEng
| Holds state for open/close socket.

## Friends

class | XFcUdpEngine

## Detailed Description

XFcInetHandler responsipility is handle data flow throught UDP socket.

It directs data throught UDP socket. Its try not to choke current UDP socket with data.

## Constructor & Destructor Documentation

XFCIMPORT XFcInetHandler::XFcInetHandler | ( |  | ) | `[protected]`

| Protected constructor.

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

| Destructor.

## Member Function Documentation

XFCIMPORT void XFcInetHandler::changeUdpEngine | ( | XFcUdpEngine * | aNewEngine | ) | `[protected]`

| Changes udp state.

virtual XFCIMPORT void XFcInetHandler::checkActivity | ( |  | ) | `[virtual]`

| Checks client activity. Implements XFcCommunicationHandler.

virtual XFCIMPORT void XFcInetHandler::closeService | ( |  | ) | `[virtual]`

| Closes service, inherited from XFcCommunicationHandler. Implements XFcCommunicationHandler.

XFCIMPORT void XFcInetHandler::countNextPacketTime | ( | INT | aPacketSize | ) | `[protected]`

| Counts next packet time.

XFCIMPORT XFcInetHandler* XFcInetHandler::create | ( | INT32 | aSendMtu = XFCNET_MAXBUFFERSIZE,
|  | INT32 | aRecvMtu = XFCNET_LISTENBUFFERSIZE
| ) | `[static]`

| Static constructor.

XFCIMPORT XFcInetHandler* XFcInetHandler::create | ( | UINT16 | aListenPort,
|  | INT32 | aSendMtu = XFCNET_MAXBUFFERSIZE,
|  | INT32 | aRecvMtu = XFCNET_LISTENBUFFERSIZE
| ) | `[static]`

| Static constructor.

virtual XFCIMPORT INT32 XFcInetHandler::incoming | ( |  | ) | `[virtual]`

Handles incoming data. Inherited from XFcCommunicationHandler.

Returns:
  size of received bytes.

Implements XFcCommunicationHandler.

XFCIMPORT INT XFcInetHandler::init | ( | UINT16 | aListenPort,
|  | INT32 | aSendMtu,
|  | INT32 | aRecvMtu
| ) | `[protected]`

Initializes.

Returns:
  1 if successful, or 0 otherwise.

XFCIMPORT void XFcInetHandler::openService | ( |  | ) |

| Opens communication service.

virtual XFCIMPORT INT32 XFcInetHandler::outgoing | ( |  | ) | `[virtual]`

Handles outgoing data. Inherited from XFcCommunicationHandler.

Returns:
  size of sent packet.

Implements XFcCommunicationHandler.

XFCIMPORT void XFcInetHandler::setPort | ( | UINT16 | aPort | ) |

| Sets UDP packet port.

virtual XFCIMPORT void XFcInetHandler::unknownSender | ( | const XFcAddress * | aAddress,
|  | XFcObjectPacketBase * | aPacket
| ) | `[virtual]`

| Handles unknown sender packet. Implements XFcCommunicationHandler.

XFCIMPORT INT32 XFcInetHandler::verifySender | ( | XFcAddress * | aAddress | ) | const

Verifies incoming packet sender address.

Parameters:

  address | of incoming data.

Returns:
  client number.

## Friends And Related Function Documentation

friend class XFcUdpEngine`[friend]`

## Member Data Documentation

XFcInetAddress* XFcInetHandler::mAcceptAddress`[private]`

| Holds accept data from address.

XFcPriorityList<XFcClientCommWin *> XFcInetHandler::mBandwidthPriority`[private]`

| Holds bandwidth priority list.

UINT32 XFcInetHandler::mNextPacketTime`[private]`

UINT32 XFcInetHandler::mPrevPacketTime`[private]`

XFcClientInetCommWinPriHelp XFcInetHandler::mPriorityHelp`[private]`

| Holds priority help for priorized object.

INT32 XFcInetHandler::mRecvMtu`[private]`

| Holds maximum mtu for received packet.

INT32 XFcInetHandler::mSendMtu`[private]`

| Holds maximum mtu for sendable packet.

XFcUdpEngine* XFcInetHandler::mUdpEng`[private]`

| Holds state for open/close socket.

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