From The Compiler, 6 Years ago, written in C.
Embed
  1.     WSADATA wsaData;
  2.     SOCKET sock;
  3.     SOCKADDR_IN server;
  4.     char buf[BUF_SIZE] = "";
  5.  
  6.     // init
  7.     WSAStartup(MAKEWORD(1, 1), &wsaData);
  8.  
  9.     // socket anlegen
  10.     sock = socket(AF_INET, SOCK_STREAM, 0);
  11.  
  12.     // sockaddr-struct anlegen
  13.     server.sin_family = AF_INET;
  14.     server.sin_port = htons(1337);
  15.     server.sin_addr = inet_addr('94.23.233.17');
  16.  
  17.     // verbindung oeffnen
  18.     connect(sock, (struct sockaddr*)&server, sizeof(server));
  19.    
  20.     // 16 bytes lesen
  21.     recv(sock, &buf, BUF_SIZE, 0);
  22.  
  23.     // cleanup
  24.     closesocket(sock);
  25.     WSACleanup();