解决方案 »

  1.   

    额,没描述清楚?
    比如第二点,什么情况下会触发compeled事件,根据MSDN的意思
    用户缓冲区满了,内部缓冲区满了,连接关闭了,是这样理解?
      

  2.   

    FALSE=0
    TRUE=1你不说到底是什么属性,或者什么函数的返回值是0或1
    单纯的问0的时候是什么样,1的时候是什么样
    这真心没法回答
      

  3.   

    不论是返回true还是false,都会触发完成事件。如果你以为返回true就不会触发完成事件了,那么可能是你多虑了,或者也可能是msdn的文档有问题(在通讯语句方面,msdn文档写的很不好)。你应该以自己的测试为准。返回true,表示你发出命令直接就执行了。返回false,表示你发出的命令没有直接执行,而是要等待几毫秒之后才执行。
      

  4.   


    不是满不满,这个没有限定的。你也没必要纠结这问题呀。。TCP是长连接,他不会关闭。关闭就断开了。
      

  5.   


    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. 
      

  6.   

    public bool ReceiveAsync(
    SocketAsyncEventArgs e
    )