Files
SQCSimulator2023/SQCSim2021/connector.h
2023-09-25 17:17:17 -04:00

32 lines
516 B
C++

#ifndef CONNECTOR_H__
#define CONNECTOR_H__
#include "define.h"
#include "../SQCSim-common/netprotocol.h"
class Connector {
public:
Connector();
~Connector();
int Init();
int Connect(sockaddr_in srv_addr, std::string name);
UINT64 getId() const;
unsigned int getSeed() const;
//void SendInput();
//int Sync();
private:
#ifdef _WIN32
WSADATA m_wsaData;
#endif
SOCKET m_sock_udp = 0,
m_sock_tcp = 0;
std::string m_name = "";
UINT64 m_sid = 0,
m_tid = 0;
unsigned int m_seed = 12345;
};
#endif