Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On Windows, when a TCP client disconnects from a TCP server and then reconnects, the ioctlsocket method still needs to be called. If it is not then blocking is automatically set to true. To test: Change code to print out the frame rate of the networkTcpClientExample project. Run networkTcpServerExample app and networkTcpClientExample app. Quit networkTcpServerExample app Run networkTcpServerExample app again You will notice the framerate of networkTcpClientExample drops to ~9fps. This is because the socket has been set with blocking = true and the server is sending messages every ~100ms. If blocking is set as false then currently the SetNonBlocking method will return before ioctlsocket is called and the socket will be set with blocking on.
- Loading branch information