MSDN: Return Value Type: System.Boolean Returns true if the I/O operation is pending. The SocketAsyncEventArgs.Completed event on the e parameter will be raised upon completion of the operation. Returns false if the I/O operation completed synchronously. In this case, The SocketAsyncEventArgs.Completed event on the e parameter will not be raised and the e object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation.
public bool ReceiveAsync( SocketAsyncEventArgs e )
比如第二点,什么情况下会触发compeled事件,根据MSDN的意思
用户缓冲区满了,内部缓冲区满了,连接关闭了,是这样理解?
TRUE=1你不说到底是什么属性,或者什么函数的返回值是0或1
单纯的问0的时候是什么样,1的时候是什么样
这真心没法回答
不是满不满,这个没有限定的。你也没必要纠结这问题呀。。TCP是长连接,他不会关闭。关闭就断开了。
MSDN:
Return Value
Type: System.Boolean
Returns true if the I/O operation is pending. The SocketAsyncEventArgs.Completed event on the e parameter will be raised upon completion of the operation.
Returns false if the I/O operation completed synchronously. In this case, The SocketAsyncEventArgs.Completed event on the e parameter will not be raised and the e object passed as a parameter may be examined immediately after the method call returns to retrieve the result of the operation.
SocketAsyncEventArgs e
)