//------------------------------------ //author: jidzh //data; 2017-10-30 //------------------------------------ #pragma once #include #include #ifdef DEBUG #else #endif // DEBUG class CWeatherDataSpider { public: CWeatherDataSpider(); ~CWeatherDataSpider(); public: bool GetWeatherDataXml(); void CloseConnect(); void ErrHandle(const std::wstring msg, int code =0); public: std::string m_strAreaCode; private: SOCKET m_socket; //WSADATA m_WSAdata; bool CheckIfRecSucceed(char * buf, int nTotalRecv, int nFlag); bool ConnectHost(); bool SendReq(); bool HandleAck(); };