C#的SocketAsyncEventArgs接受数据后,如果我处理的比较慢,而客户端又有新的数据上来的话,saea中Buffer的数据会被覆盖吗
不会覆盖,Socket 接收数据是基于流(Stream),Buffer 是为了更高效的读写 Stream
"A stream can be thought of as items on a conveyor belt being processed one at a time rather than in large batches." (From wikipedia)
每一个客户端1个SocketAsyncEventArgs 在重新Socket.ReceiveAsync(e);之前肯定不会覆盖的,在之后收会重复覆盖,重复使用buffer缓冲区了