Windows Socket (Winsock2)

Unix Server

  1. On STU.ipv6.club.tw, download "server.c" with
  2. Compile it with
  3. Run it with

Windows Client

  1. Download a client program for Winsock2.
  2. Compile it successfully.
  3. Press Alt-F7 to configure project properties. Modify "Configuration Properties - Debugging - Command Argument" as "STU.ipv6.club.tw".
  4. Press Ctrl-F5 to run the program. You can see that messages was sent and received between the client and the server.

Windows Server

  1. Download a server program for Winsock2.
  2. Compile it successfully.
  3. Press Ctrl-F5 to run the program. Now it is waiting a client to send a message.
  4. Note that your firewall may request you to allow this connection when you run the server program.
  5. Start a command window by pressing Window-R and run the command "cmd". Then use the command "ipconfig" to find out the IP address of your Windows. (Assume it is 1.2.3.4)

Unix Client

  1. On STU.ipv6.club.tw, download client.c and compile with the command
  2. Run the program by "./client.exe 1.2.3.4 12345". Input any message such as "Good Evening".
  3. You can see that the server receives this message and send back a response.

References

  1. Porting TCP/IP software to Win32.