Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. #include <windows.h>
  2. #include <boost/format.hpp>
  3. #include <WinSock2.h>
  4.  
  5. int connecttosite()
  6. {
  7.    using namespace boost;
  8.  
  9.    SOCKET sct = WSASocket(AF_INET, SOCK_STREAM, 0, NULL, NULL, WSA_FLAG_OVERLAPPED);
  10.    if (sct == INVALID_SOCKET)
  11.    {
  12.       cout << format("WSASocket failed with error code %1%.") % WSAGetLastError();
  13.       return -1;
  14.    }
  15.  
  16. //   WSAConnectByName(sct, TEXT(
  17. }
  18.  
  19. int main()
  20. {
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement