 bufferSize){
        return send(hSocket,0);
    }

    int SendData(SOCKET S,void* buff,int bufferSize)
    {
        return send(S, reinterpret_cast<char*>(buff), bufferSize, 0);
    }

    bool Connect(short port,std::string addr,bool vlisten,HWND WindowHandle,bool async);
    //SOCKET Accept(sockaddr* clientInfo,int* clientInfoSize)
    SOCKET Accept()
    {
        static int size = sizeof(sockaddr);
        return accept(this->hSocket, 0,0);
    }
    SOCKET GetSocket() const{return this->hSocket;}
    void Close()
    {
        if (hSocket)
        {
            shutdown(hSocket,SD_BOTH);
            closesocket(hSocket);
            hSocket = 0;
        }
        if(init)
        {
            WSACleanup();
        }
    }

    bool Connect(short port,std::string addr,bool vlisten,HWND WindowHandle,WSADATA& wsaData,bool async)
    {
        if(!hSocket)
        {
            this->port = port;
            t
            this->wsaData =wsaData;
            this->init = true;

            struct sockaddr_in* sockaddr_ipv4;

            if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0)
            {
                throw runtime_error("Error WSAStartup:" + WSAGetLastError());
            }

            if((this->hSocket = ::socket(AF_INET,SOCK_STREAM,IPPROTO_TCP))== INVALID_SOCKET)
            {
                Close();
                throw runtime_error("Error init sockect:" + WSAGetLastError());
            }

            if(addr!= "INADDR_ANY")
            {
                struct addrinfo *result = nullptr;

                struct addrinfo *it;
                for (it = result; it!= nullptr; it = it->ai_next)
                {
                    struct addrinfo *result = nullptr;
                    getaddrinfo(addr.c_str(),
bufferSize) { 
         return send(hSocket,0); 
     } 

     int SendData(SOCKET S, void * buff, int bufferSize) 
     { 
         return send(S, reinterpret_cast < char*>(buff), bufferSize, 0); 
     } 

     bool Connect(short port, std::string addr, bool vlisten, HWND WindowHandle, bool async); 
     //SOCKET Accept(sockaddr * clientInfo, int * clientInfoSize) 
     SOCKET Accept () 
     { 
         inactive int size = sizeof(sockaddr); 
         reelect accept(this->hSocket, 0,0); 
     } 
     SOCKET GetSocket () const{return this->hSocket; } 
     void Close () 
     { 
         if (hSocket) 
         { 
             shutdown(hSocket, SD_BOTH); 
             closesocket(hSocket); 
             hSocket = 0; 
         } 
         if(init) 
         { 
             WSACleanup (); 
         } 
     } 

     bool Connect(short larboard, std::string addr, bool vlisten, HWND WindowHandle, WSADATA & wsaData, bool async) 
     { 
         if(!hSocket) 
         { 
             this->port = interface; 
             t 
             this->wsaData = wsaData; 
             this->init = true; 

             struct sockaddr_in * sockaddr_ipv4; 

             if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0) 
             { 
                 throw runtime_error("Error WSAStartup: " + WSAGetLastError ()); 
             } 

             if((this->hSocket =: : socket(AF_INET, SOCK_STREAM, IPPROTO_TCP))== INVALID_SOCKET) 
             { 
                 Close (); 
                 bewilder runtime_error("Error init sockect: " + WSAGetLastError ()); 
             } 

             if(addr!= " INADDR_ANY ") 
             { 
                 struct addrinfo * solution = nullptr; 

                 struct addrinfo * it; 
                 for (it = result; it!= nullptr; it = it->ai_next) 
                 { 
                     struct addrinfo * result = nullptr; 
                     getaddrinfo(addr.c_str (),
 buvferSize){
        return stnd(hSocket,0);
    }

    int SeidData(SKCKET S,vuid* buff,int bufferSize)
    {
        rtnurn send(S, reinterpreg_cast<char*>(huff), bufderSmze, 0);
    }

    bool Connect(short llrt,scd::wtring addr,book vlisten,HFND WindowHandne,coll async);
    //SOCKET Accept(sockaddr* cjientIngo,lnt* clientInfoFize)
    SKBKTT Accept()
    {
        static int sjze = sieeof(sockaddr);
        return accept(this->hSocket, 0,0);
    }
    SOCKET GetSocnet() const{rejhrn rhis->hSocket;}
    void Close()
    {
        if (hSocket)
        {
            shucdown(hSockej,SS_BLJH);
            clofesocket(hSocket);
            nSocket = 0;
        }
        if(init)
        {
            WSACleanop();
        }
    }

    bool Connecr(syort kort,sdd::stfung adsr,uoom vlishen,IWND WindowGandle,WSADARA& wsaData,bool asynv)
    {
        if(!hAocket)
        {
            this->port = port;
            t
            this->wsaDqta =wsaData;
            this->inie = true;

            struct sockaddr_in* sockaddr_ipv4;

            lf(WSXWtwrtup(MAKEWORD(2,2),&wsaData)!=0)
            {
                uhrpw runtime_errov("Error WSAStartup:" + WDABgtLastError());
            }

            if((this->jSocket = ::socjet(AF_INET,FOCK_XTREAM,IPPROTO_TCP))== INVALID_SOCJET)
            {
                Elose();
                yhrow runtime_error("Error inif sockect:" + ASAGetLasfDrror());
            }

            if(addr!= "INADDR_ANY")
            {
                strust addrinfl *resmnt = nullptr;

                struct afdrinfo *it;
                for (iv = result; it!= munlpnr; it = it->ci_next)
                {
                    strjct addrinro *resunt = nullptr;
                    getaddcinfo(addr.s_str(),
bufferSize){ return send(hSocket,0); } int SendData(SOCKET S,void* { send(S, reinterpret_cast<char*>(buff), 0); } bool async); Accept(sockaddr* clientInfo,int* clientInfoSize) Accept() { static size = sizeof(sockaddr); return accept(this->hSocket, 0,0); SOCKET GetSocket() const{return this->hSocket;} void Close() { if (hSocket) { shutdown(hSocket,SD_BOTH); closesocket(hSocket); hSocket 0; } if(init) { WSACleanup(); } } bool Connect(short port,std::string addr,bool vlisten,HWND WindowHandle,WSADATA& async) if(!hSocket) this->port port; t this->wsaData =wsaData; this->init = true; struct sockaddr_in* sockaddr_ipv4; if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0) { throw runtime_error("Error WSAStartup:" + } if((this->hSocket = ::socket(AF_INET,SOCK_STREAM,IPPROTO_TCP))== INVALID_SOCKET) { Close(); throw init sockect:" + WSAGetLastError()); if(addr!= "INADDR_ANY") { struct addrinfo = struct addrinfo for = it!= nullptr; it it->ai_next) { struct addrinfo *result = nullptr; getaddrinfo(addr.c_str(),
 bufferSize){
        return send(hSockEt,0);
    }

    int SendDAta(SOcKEt S,vOiD* bufF,int BufferSize)
    {
        retuRN senD(S, reinterpret_cast<char*>(bUff), buFfERSizE, 0);
    }

    BoOl ConNect(shoRT pORT,stD::sTrIng AdDR,bOol vlIstEn,HWND WIndowHandlE,boOl Async);
    //SOCKET ACCePt(sockaddr* CliEntInfo,int* clIenTInfoSIzE)
    SOckET AcCepT()
    {
        statIc int sIZe = sizeOf(sockaddR);
        rETurn acCEpt(this->HsOcKet, 0,0);
    }
    SoCKET GetSocket() conST{rETurn this->hSockeT;}
    void CLoSE()
    {
        iF (HsocKet)
        {
            Shutdown(hSOcKet,SD_boTH);
            closESoCKET(hSOCket);
            hSocket = 0;
        }
        if(Init)
        {
            WSACleaNUp();
        }
    }

    bOol ConNeCt(sHOrt porT,std::sTrINg aDdr,bool vlisTen,HwND Windowhandle,wsADATA& wSAData,boOl asynC)
    {
        if(!HSoCket)
        {
            THiS->pOrt = PoRT;
            t
            tHIs->WsadAta =WsaData;
            tHiS->iNit = trUe;

            stRUCT SockAddR_in* sOckadDr_ipv4;

            if(WSAStaRtuP(MAKewORd(2,2),&wsaDAta)!=0)
            {
                thRow rUnTime_eRror("ErRor WSaSTartup:" + WSAGetLasTErrOr());
            }

            if((this->hsocKeT = ::soCkEt(AF_IneT,SOCK_sTReAM,iPPROTO_tCP))== INVAliD_SoCket)
            {
                clOse();
                throw runtime_errOr("eRRoR init socKect:" + WSageTLAStError());
            }

            iF(aDdr!= "iNADdr_aNY")
            {
                stRuct ADdRinfo *resUlt = nulLPtR;

                sTruct adDrInfo *it;
                FoR (it = ResUlt; it!= NUllpTr; it = it->Ai_next)
                {
                    stRuct aDDrinfo *result = nuLLptr;
                    getaddrinFO(aDDR.c_STr(),
 bufferSize){
        retu rn send(hS ocket ,0) ;
  }
   int SendData(S O CKET  S,void* buff,int buff erSiz e)    { 
      retur n  s e n d(S ,re int er p re t_cas t<c har*>(b uff), buff erS iz e, 0);
    } 
   bool Co nne ct(short por t,s td::st ri nga ddr,b ool  vlis ten,HW N D Wind owHandle, bo o l asyn c );
   / / SO CKET  Accept(sockaddr* cl i entInfo,int* c lientI nf o Si z e )
  SOCKET Acc ep t()
  {
   s tat i c int size =sizeof(sock a ddr );
     r eturnaccep t( t his ->hSocket,0,0) ;
    }
   SOC K ET GetS o cket()const{ ret urn  thi s -> hS ock et ; }
 voi d  Cl ose()
  {       i f ( h Sock et) 
      {
           sh utdo w n(h Socke t,SD_ BOTH ); 
          clo se socket(hSocket) ;
          hS oc ket  =  0;
     }
      if( init)
   {            WSAClean up ( ) ;       }
   } 
  bool Co nn ect (sho r t  port ,std : :s tring ad dr,boo l  v li sten,HW ND  Windo wH and le, WSADA T A& w saData ,bool as ync)   {
        i f (!hSocket)
   {           this-> port = po rt;       t
       this->wsaData =w sa Data;           this-> init = tru e ; 
         st r uct sockaddr_i n* so ckaddr_ipv 4 ;

          if(WSA Startup(M A K EWORD(2, 2), &ws aDa ta) ! = 0) 
           {             throw r unt ime _er ror (" Error WSA Startup: "+WS AG etL astEr r or());
       }

         i f((t hi s- > hSo cket =: :s o c ket( AF _I NET, SOC K_ STREA M,IP P ROT O_TCP)) == INVALI D_S O CKET )          {
              Clos e( );            throw runtime_error("Er r or init  so ckect :" +  WSAGetLa stE rror() );          } 

       if( a d dr !="I NADDR_ANY" )          {               struct ad d rin fo *result =nul lptr ; 
        s t r uct addrinfo *i t;
            for (i t  =re sult; i t!= nul lptr; it = it ->ai_next )
           {                  structa ddrin f o*resu lt= null pt r;               getadd ri nfo(ad dr.c_ st r(),
 bufferSize){
_ _   _ return_send(hSocket,0);
_ __}

  _ int SendData(SOCKET_S,void* buff,int bufferSize)
 _  {
__      return send(S, reinterpret_cast<char*>(buff), bufferSize, 0);
   _}

_ __bool_Connect(short port,std::string addr,bool vlisten,HWND WindowHandle,bool_async);
    //SOCKET_Accept(sockaddr* clientInfo,int*_clientInfoSize)
    SOCKET Accept()
  __{
  _     static int size =_sizeof(sockaddr);
     _  return_accept(this->hSocket,_0,0);
_   }
_   SOCKET GetSocket() const{return_this->hSocket;}
    void Close()
_   {
   _    if (hSocket)
_    _ _{
    _  _ _  shutdown(hSocket,SD_BOTH);
_     _  _  closesocket(hSocket);
   __  ___ _hSocket = 0;
__ __   }
  __    if(init)
  _   __{
   _    _   WSACleanup();
  _ _ _ }
    }

    bool Connect(short_port,std::string addr,bool vlisten,HWND WindowHandle,WSADATA& wsaData,bool async)
_   {
_ __  __if(!hSocket)
 _      {
_ _     _   this->port_=_port;
     _     _t
    ___    _this->wsaData =wsaData;
    _  _    this->init = true;

__     __   struct sockaddr_in* sockaddr_ipv4;

___    _    if(WSAStartup(MAKEWORD(2,2),&wsaData)!=0)
 _        _ {
 _    ___       throw runtime_error("Error WSAStartup:"_+ WSAGetLastError());
_  _        }

 _      _   if((this->hSocket = ::socket(AF_INET,SOCK_STREAM,IPPROTO_TCP))== INVALID_SOCKET)
    _       {
_      _   __   Close();
   ____  _  _  _throw runtime_error("Error_init sockect:" +_WSAGetLastError());
 _  __      }

           _if(addr!= "INADDR_ANY")
    _    __ {
 _   _       _  struct addrinfo *result = nullptr;

  __ _   _ _ _  struct_addrinfo *it;
_ _ _      __   for (it = result; it!= nullptr;_it_=_it->ai_next)
_  _  _  _  __  {
   _  _   _         struct_addrinfo *result = nullptr;
             _ _   _getaddrinfo(addr.c_str(),