Socket demo with Error reporting, making a connection and streaming data. Sample socket test case using pthreads for threading, not all parts of the code will be needed for all situations. Also, some may need more features than this code shows. The code lies between a 'clean sample of one feature' and a 'final working code set'.
Working socket demo with error reporting as of VS2015 x64. Sharing this because when I was making samples there were limited working samples for my needs, and it was a bit hard to find all of the error reporting code. -Greg Gutmann
The terms client and sever are used loosly: the Server is the code that starts first and waits for a connection. For this code the sever is the main receiver and the client is the main sender. The code connects exchanges parameters - starts the main data sending loop - after a given time the "ClientFile" sets a flag for the connection to be closed. There are many print lines commented out, they can be uncommented to watch more of what is going on in the CMD.
This work is licensed under a Creative Commons Attribution 4.0 International License.
This license alows distribution, remix, tweak, and building upon the work, even commercially, as long as credit is given for the original creation.