What is the correct way of reading from a TCP socket in C/C++?

前端 未结 8 1483
后悔当初
后悔当初 2020-11-28 04:33

Here\'s my code:

// Not all headers are relevant to the code snippet.
#include 
#include 
#include 
#in         


        
8条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-28 04:41

    This is an article that I always refer to when working with sockets..

    THE WORLD OF SELECT()

    It will show you how to reliably use 'select()' and contains some other useful links at the bottom for further info on sockets.

提交回复
热议问题