已锁定 RCP Client Blocking Send/Receive

  • 2012年6月15日 0:59
     
     

    What is are block sends and receive on a TCP client?  I believe the recieve will block or wait until it receives something.

    How would the send work?  It can't really block until you send something, or is a send not really a blocking call?

    Any examples?

    Thanks

    w256

    • 已移动 Alexander Sun 2012年6月18日 6:40 Move to more appropriate forum (From:Visual C# General)
    •  

全部回复

  • 2012年6月15日 1:02
     
     
    Do you mean RCP or RPC ?


  • 2012年6月15日 12:39
     
     
    If I have TCP client, isn't there a blocking send a recieve method to send data to the server?
  • 2012年6月15日 15:15
     
     

    Yes you need to first get the NetworkStream from the TcpClient via GetStream(). Then the methods Read and Write are the blocking calls. The Begin/End Versions are asynchronous.

    Thanks,

    Brad

  • 2012年6月15日 17:41
     
     

    Could you please check-out below thread

    http://social.msdn.microsoft.com/Forums/en-US/ncl/thread/7a2d724a-22c6-4ff2-9a7a-c2312ea4dd42


    Regards,
    Ahmed Ibrahim
    SQL Server Setup Team
    My Blog
    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you.
    This can be beneficial to other community members reading the thread.