Add handshaking.

This commit is contained in:
TAO Cheng
2014-10-29 21:38:54 +08:00
parent 32f9acc866
commit ee7af5a45b
7 changed files with 77 additions and 108 deletions
@@ -34,6 +34,7 @@ public:
TCPIP_RETURN_CODE Recv(int _Addr,int& _Data,bool _bWait);
TCPIP_RETURN_CODE DisConnect();
TCPIP_RETURN_CODE GetHostIPAddr(in_addr& _IPAddress);
TCPIP_RETURN_CODE Handshaking();
LRESULT OnSocket(WPARAM wParam, LPARAM lParam);
@@ -51,9 +52,11 @@ private:
static SOCKET m_Socket;
static in_addr m_SreverIPAddress;
static in_addr m_ClientIPAddress;
static u_short m_iServerPortNumber;
void clearSendBuf();
TCPIP_RETURN_CODE SendBuffer();
void m_ClearSendBuf();
int Init_Winsock();
void m_ProcessSocketWriteEvent();