Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CSocketInConnection Class Reference

#include <socketInConnection.h>

+ Collaboration diagram for CSocketInConnection:

Public Member Functions

bool connectToClient ()
 
 CSocketInConnection (int theConnectionPort, unsigned short maxPacketSize=250, char headerID1=59, char headerID2=57)
 
std::string getConnectedMachineIP ()
 
char * receiveData (int &dataSize)
 
bool replyToReceivedData (char *data, int dataSize)
 
virtual ~CSocketInConnection ()
 

Protected Member Functions

unsigned int _getTimeDiffInMs (unsigned int lastTime)
 
unsigned int _getTimeInMs ()
 
int _receiveSimplePacket (std::vector< char > &packet)
 
bool _sendSimplePacket (char *packet, int packetLength, unsigned short packetsLeft)
 

Protected Attributes

char _headerByte1
 
char _headerByte2
 
unsigned short _maxPacketSize
 
SOCKET _socketClient
 
std::string _socketConnectedMachineIP
 
int _socketConnectionPort
 
bool _socketConnectWasOk
 
struct sockaddr_in _socketLocal
 
SOCKET _socketServer
 
fd_set _socketTheSet
 

Detailed Description

Definition at line 47 of file socketInConnection.h.

Constructor & Destructor Documentation

§ CSocketInConnection()

CSocketInConnection::CSocketInConnection ( int  theConnectionPort,
unsigned short  maxPacketSize = 250,
char  headerID1 = 59,
char  headerID2 = 57 
)

Definition at line 20 of file socketInConnection.cpp.

§ ~CSocketInConnection()

CSocketInConnection::~CSocketInConnection ( )
virtual

Definition at line 35 of file socketInConnection.cpp.

Member Function Documentation

§ _getTimeDiffInMs()

unsigned int CSocketInConnection::_getTimeDiffInMs ( unsigned int  lastTime)
protected

Definition at line 255 of file socketInConnection.cpp.

§ _getTimeInMs()

unsigned int CSocketInConnection::_getTimeInMs ( )
protected

§ _receiveSimplePacket()

int CSocketInConnection::_receiveSimplePacket ( std::vector< char > &  packet)
protected

Definition at line 182 of file socketInConnection.cpp.

§ _sendSimplePacket()

bool CSocketInConnection::_sendSimplePacket ( char *  packet,
int  packetLength,
unsigned short  packetsLeft 
)
protected

Definition at line 160 of file socketInConnection.cpp.

§ connectToClient()

bool CSocketInConnection::connectToClient ( )

Definition at line 56 of file socketInConnection.cpp.

§ getConnectedMachineIP()

std::string CSocketInConnection::getConnectedMachineIP ( )

Definition at line 153 of file socketInConnection.cpp.

§ receiveData()

char * CSocketInConnection::receiveData ( int &  dataSize)

Definition at line 89 of file socketInConnection.cpp.

§ replyToReceivedData()

bool CSocketInConnection::replyToReceivedData ( char *  data,
int  dataSize 
)

Definition at line 118 of file socketInConnection.cpp.

Member Data Documentation

§ _headerByte1

char CSocketInConnection::_headerByte1
protected

Definition at line 80 of file socketInConnection.h.

§ _headerByte2

char CSocketInConnection::_headerByte2
protected

Definition at line 81 of file socketInConnection.h.

§ _maxPacketSize

unsigned short CSocketInConnection::_maxPacketSize
protected

Definition at line 82 of file socketInConnection.h.

§ _socketClient

SOCKET CSocketInConnection::_socketClient
protected

Definition at line 68 of file socketInConnection.h.

§ _socketConnectedMachineIP

std::string CSocketInConnection::_socketConnectedMachineIP
protected

Definition at line 78 of file socketInConnection.h.

§ _socketConnectionPort

int CSocketInConnection::_socketConnectionPort
protected

Definition at line 76 of file socketInConnection.h.

§ _socketConnectWasOk

bool CSocketInConnection::_socketConnectWasOk
protected

Definition at line 77 of file socketInConnection.h.

§ _socketLocal

struct sockaddr_in CSocketInConnection::_socketLocal
protected

Definition at line 69 of file socketInConnection.h.

§ _socketServer

SOCKET CSocketInConnection::_socketServer
protected

Definition at line 67 of file socketInConnection.h.

§ _socketTheSet

fd_set CSocketInConnection::_socketTheSet
protected

Definition at line 71 of file socketInConnection.h.


The documentation for this class was generated from the following files: