Hauptseite | Klassenhierarchie | Alphabetische Liste | Auflistung der Klassen | Auflistung der Dateien | Klassen-Elemente

CTCPIPComm Klassenreferenz

Class of CTCPIPComm. Mehr...

#include <TCPIPComm.h>

Klassendiagramm für CTCPIPComm:

CTCPIPCommReceive CTCPIPCommSend CTCPIPCommConnect CTraceObject CTraceObject CTraceObject CGatewaySecurity CGatewayServer Aufstellung aller Elemente

Öffentliche Methoden

 CTCPIPComm (const short TCPport, const char *pIPAddress, const bool PassiveConnection, const long MaxSendDataLen, const long MaxRecvDataLen)
 Conctuctor creates a new object of CTCPIPComm.

virtual ~CTCPIPComm ()
 destructor

int GetLastSocketError (void) const
 GetLastSocketError returns the last socket error occured.

bool IsConnected (void) const
 IsConnected returns the connection state of the connection.

bool ConnectRequest (void)
 ConnectRequest Tries to connect to the communication partner.

bool Send (const void *pData, const long DataLen)
 Send Transmits the given data to the communication partner.


Geschützte Methoden

virtual void ConnectIndication (void)=0
 ConnectIndication Indicates that the TCP/IP connection is established, pure virtual function.

virtual void DisconnectIndication (void)=0
 DisconnectIndication Indicates that the TCP/IP connection was broken down.

 CTCPIPComm (void)
 Conctuctor.

void Initialize (const short TCPport, const char *pIPAddress, const bool PassiveConnection, const long MaxSendDataLen, const long MaxRecvDataLen)
 Conctuctor Initializes a object of CTCPIPComm.


Private Methoden

void ConInd (void)
 ConInd Will be called from CTCPIPCommConnect indicating estalished connection.

void DisInd (void)
 DisInd Will be called from CTCPIPCommConnect indicating a broken connection.

void RecvDisInd (void)
 RecvDisInd Will be called from CTCPIPCommRecv indicating a broken connection.

void SendDisInd (void)
 SendDisInd Will be called from CTCPIPCommSend indicating a broken connection.


Private Attribute

int m_LastSocketError
bool m_PassiveConnection
bool m_LineConnected
SOCKADDR_IN m_RemoteAddr
SOCKET m_PassiveSocket
bool m_bInitialized
bool m_bTerminating

Statische private Attribute

int m_NumOfInstances = 0
bool m_bArrayUsed [MAX_DIF_ADDR] = { false, false }
SOCKADDR_IN m_ArrayRemoteAddr [MAX_DIF_ADDR] = { 0, 0 }
SOCKET m_ArrayPassiveSocket [MAX_DIF_ADDR] = { INVALID_SOCKET, INVALID_SOCKET }

Ausführliche Beschreibung

Class of CTCPIPComm.

Version:
1.1
Autor:
Udo Weber


Beschreibung der Konstruktoren und Destruktoren

CTCPIPComm::CTCPIPComm const short  TCPport,
const char *  pIPAddress,
const bool  PassiveConnection,
const long  MaxSendDataLen,
const long  MaxRecvDataLen
 

Conctuctor creates a new object of CTCPIPComm.

Parameter:
TCPport Port number to be used for communication
pIPAddress NULL terminated string containing IP Address or Name
PassiveConnection true if awaiting the connection from partner
MaxSendDataLen Maximum length for sending messages
MaxRecvDataLen Maximum length for receiving messages
Rückgabe:
-

CTCPIPComm::CTCPIPComm void   )  [protected]
 

Conctuctor.

Initialize-Funktion has to be used when this constructor is used.


Dokumentation der Elementfunktionen

void CTCPIPComm::ConInd void   )  [private, virtual]
 

ConInd Will be called from CTCPIPCommConnect indicating estalished connection.

Parameter:
- 
Rückgabe:
-

Implementiert CTCPIPCommConnect.

virtual void CTCPIPComm::ConnectIndication void   )  [protected, pure virtual]
 

ConnectIndication Indicates that the TCP/IP connection is established, pure virtual function.

Parameter:
- 
Rückgabe:
-

Implementiert in CGatewaySecurity und CGatewayServer.

bool CTCPIPComm::ConnectRequest void   ) 
 

ConnectRequest Tries to connect to the communication partner.

Parameter:
- 
Rückgabe:
true if function call successful (does not mean that the connection was connected --> ConnectIndication

virtual void CTCPIPComm::DisconnectIndication void   )  [protected, pure virtual]
 

DisconnectIndication Indicates that the TCP/IP connection was broken down.

Parameter:
- 
Rückgabe:
-

Implementiert in CGatewaySecurity und CGatewayServer.

void CTCPIPComm::DisInd void   )  [private, virtual]
 

DisInd Will be called from CTCPIPCommConnect indicating a broken connection.

Parameter:
- 
Rückgabe:
-

Implementiert CTCPIPCommConnect.

int CTCPIPComm::GetLastSocketError void   )  const [inline]
 

GetLastSocketError returns the last socket error occured.

Parameter:
- 
Rückgabe:
last socket error

Erneute Implementation von CTCPIPCommConnect.

void CTCPIPComm::Initialize const short  TCPport,
const char *  pIPAddress,
const bool  PassiveConnection,
const long  MaxSendDataLen,
const long  MaxRecvDataLen
[protected]
 

Conctuctor Initializes a object of CTCPIPComm.

Parameter:
TCPport Port number to be used for communication
pIPAddress NULL terminated string containing IP Address or Name
PassiveConnection true if awaiting the connection from partner
MaxSendDataLen Maximum length for sending messages
MaxRecvDataLen Maximum length for receiving messages
Rückgabe:
-

bool CTCPIPComm::IsConnected void   )  const [inline]
 

IsConnected returns the connection state of the connection.

Parameter:
- 
Rückgabe:
true if connection established, otherwise false

void CTCPIPComm::RecvDisInd void   )  [private, virtual]
 

RecvDisInd Will be called from CTCPIPCommRecv indicating a broken connection.

Parameter:
- 
Rückgabe:
-

Implementiert CTCPIPCommReceive.

bool CTCPIPComm::Send const void *  pData,
const long  DataLen
 

Send Transmits the given data to the communication partner.

Parameter:
pData Pointer to the data to be sent
DataLen Length of the data
Rückgabe:
true if function call successful

Erneute Implementation von CTCPIPCommSend.

void CTCPIPComm::SendDisInd void   )  [private, virtual]
 

SendDisInd Will be called from CTCPIPCommSend indicating a broken connection.

Parameter:
- 
Rückgabe:
-

Implementiert CTCPIPCommSend.


Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien:
Erzeugt am Tue Mar 11 14:25:09 2008 für SchunkFPS-TCPIPRS232Gateway von doxygen 1.3.7