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

#include <socketOutConnection.h>

+ Collaboration diagram for CSocketOutConnection:

Public Member Functions

int connectToServer ()
 
 CSocketOutConnection (const char *theConnectionAddress, int theConnectionPort, unsigned short maxPacketSize=250, char headerID1=59, char headerID2=57)
 
char * receiveReplyData (int &dataSize)
 
bool sendData (char *data, int dataSize)
 
virtual ~CSocketOutConnection ()
 

Protected Member Functions

int _getTimeDiffInMs (int lastTime)
 
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 _socketConn
 
std::string _socketConnectionAddress
 
int _socketConnectionPort
 
struct sockaddr_in _socketServer
 

Detailed Description

Definition at line 41 of file socketOutConnection.h.

Constructor & Destructor Documentation

§ CSocketOutConnection()

CSocketOutConnection::CSocketOutConnection ( const char *  theConnectionAddress,
int  theConnectionPort,
unsigned short  maxPacketSize = 250,
char  headerID1 = 59,
char  headerID2 = 57 
)

Definition at line 21 of file socketOutConnection.cpp.

§ ~CSocketOutConnection()

CSocketOutConnection::~CSocketOutConnection ( )
virtual

Definition at line 31 of file socketOutConnection.cpp.

Member Function Documentation

§ _getTimeDiffInMs()

int CSocketOutConnection::_getTimeDiffInMs ( int  lastTime)
protected

Definition at line 218 of file socketOutConnection.cpp.

§ _getTimeInMs()

int CSocketOutConnection::_getTimeInMs ( )
protected

Definition at line 205 of file socketOutConnection.cpp.

§ _receiveSimplePacket()

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

Definition at line 165 of file socketOutConnection.cpp.

§ _sendSimplePacket()

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

Definition at line 141 of file socketOutConnection.cpp.

§ connectToServer()

int CSocketOutConnection::connectToServer ( )

Definition at line 44 of file socketOutConnection.cpp.

§ receiveReplyData()

char * CSocketOutConnection::receiveReplyData ( int &  dataSize)

Definition at line 111 of file socketOutConnection.cpp.

§ sendData()

bool CSocketOutConnection::sendData ( char *  data,
int  dataSize 
)

Definition at line 75 of file socketOutConnection.cpp.

Member Data Documentation

§ _headerByte1

char CSocketOutConnection::_headerByte1
protected

Definition at line 69 of file socketOutConnection.h.

§ _headerByte2

char CSocketOutConnection::_headerByte2
protected

Definition at line 70 of file socketOutConnection.h.

§ _maxPacketSize

unsigned short CSocketOutConnection::_maxPacketSize
protected

Definition at line 71 of file socketOutConnection.h.

§ _socketConn

SOCKET CSocketOutConnection::_socketConn
protected

Definition at line 66 of file socketOutConnection.h.

§ _socketConnectionAddress

std::string CSocketOutConnection::_socketConnectionAddress
protected

Definition at line 58 of file socketOutConnection.h.

§ _socketConnectionPort

int CSocketOutConnection::_socketConnectionPort
protected

Definition at line 59 of file socketOutConnection.h.

§ _socketServer

struct sockaddr_in CSocketOutConnection::_socketServer
protected

Definition at line 67 of file socketOutConnection.h.


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