#include <NetworkChannel.h>
CNetworkChannel |
( |
INetDispatch * |
piNetDispatch = NULL , |
|
|
unsigned short |
usPort = 0 |
|
) |
| |
virtual bool Initialize |
( |
void |
| ) |
|
|
virtual |
Method Name: Initialize
Inputs: None
Outputs: None
Returns: bool
Description: Performs runtime initialization that may be failure prone and therefore inappropriate for execution within a constructor.
Usage Notes:
Reimplemented from CBaseClass.
virtual bool Open |
( |
int |
iAddressType, |
|
|
int |
iSocketType, |
|
|
int |
iProtocol |
|
) |
| |
|
virtual |
virtual bool Connect |
( |
unsigned char * |
puchIPAddress = NULL , |
|
|
unsigned short |
usPortID = 0 |
|
) |
| |
|
virtual |
virtual int Receive |
( |
unsigned char * |
puchBuffer, |
|
|
unsigned long |
ulRxBytes |
|
) |
| |
|
virtual |
virtual void Dispatch |
( |
unsigned char * |
puchBuffer, |
|
|
unsigned long |
ulBytesRecvd |
|
) |
| |
|
virtual |
virtual int Send |
( |
unsigned char * |
puchDataBuffer, |
|
|
unsigned long |
ulBytesToSend |
|
) |
| |
|
virtual |
virtual int getSocketDescriptor |
( |
void |
| ) |
|
|
virtual |
virtual int getSocketPort |
( |
void |
| ) |
|
|
virtual |
virtual bool Close |
( |
void |
| ) |
|
|
virtual |
unsigned int GetSocket |
( |
void |
| ) |
|
|
inline |
unsigned short GetPort |
( |
void |
| ) |
|
|
inline |
bool IsConnected |
( |
void |
| ) |
|
|
inline |
virtual bool Bind |
( |
SOCKADDR_IN * |
lpAddr = NULL | ) |
|
|
privatevirtual |
Macro Name: DECLARE_IBASE_M
Inputs: None
Outputs: None
Returns: None
Description: This implements the IBaseClass functions used and exposed by derived classes.
Usage Notes:
static unsigned short GetNewPort |
( |
void |
| ) |
|
|
staticprivate |
void GetRemoteAddress |
( |
SOCKADDR_IN * |
lpAddr | ) |
|
|
private |
void SetRemoteAddress |
( |
SOCKADDR_IN * |
lpAddr | ) |
|
|
private |
CRITICAL_SECTION m_csChannelSynchronized |
|
private |
INetDispatch* m_piNetDispatch |
|
private |