27 #pragma message("Adding library: Winmm.lib") 28 #pragma comment(lib,"Winmm.lib") 29 #pragma message("Adding library: Ws2_32.lib") 30 #pragma comment(lib,"Ws2_32.lib") 32 typedef timeval _timeval;
34 #elif defined (__linux) || defined (__APPLE__) 38 #include <sys/socket.h> 39 #include <arpa/inet.h> 42 #define INVALID_SOCKET (-1) 43 typedef socklen_t _socklen;
50 CSocketInConnection(
int theConnectionPort,
unsigned short maxPacketSize=250,
char headerID1=59,
char headerID2=57);
73 WSADATA _socketWsaData;
std::string _socketConnectedMachineIP
bool _sendSimplePacket(char *packet, int packetLength, unsigned short packetsLeft)
CSocketInConnection(int theConnectionPort, unsigned short maxPacketSize=250, char headerID1=59, char headerID2=57)
char * receiveData(int &dataSize)
std::string getConnectedMachineIP()
virtual ~CSocketInConnection()
unsigned int _getTimeInMs()
unsigned short _maxPacketSize
unsigned int _getTimeDiffInMs(unsigned int lastTime)
bool replyToReceivedData(char *data, int dataSize)
int _receiveSimplePacket(std::vector< char > &packet)
struct sockaddr_in _socketLocal
int _socketConnectionPort