Week 11: We will discuss the Winsock Client server example from MSDN.
There is a good Winsock Client/Server project here.
1) Create 2 C++ console projects one for the server and one for the client. Take the default settings.
2) Paste the code keeping the #include "stdafx.h" include.
3) In the client project, goto project properties->Configuration Properties->Debugging->Command Arguments=localhost
This is a MSDN doc about the accept function in the server.
4) For MS Visual Studio 2017 Do this:
const char *sendbuf = "this is a test";
Note: You can ignore the firewall error on the server.
Monday, October 29, 2018
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment