我们知道客户端会在发出连接请求后立刻传送数据,所以如果我们准备好接收缓冲区会使事情变得更为容易。
Since you know the client will connect and immediately send data, supplying a receive buffer can make things substantially easier.
一旦接收到了转储数据的信号,将使用 is_dumping 全局变量禁止其他的线程更改该缓冲区的内容。
The is_dumping global variable is used to stop other threads from changing the contents of the buffer once a signal has been received to dump data.
例如,通常有一个小(可能是4 k)缓冲区用来接收数据(从soket)。
For example, it is common to have a small (maybe 4k) buffer for the incoming data (from the sockets).
应用推荐