Socket closing connection RRS feed

  • Question

  •     I am using Asynchronous sockets via C# and after a send, the socket closes. There  is no code in either client or server that explicitly closes the sockets.  I did use the below on the client too    

            _Socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.KeepAlive, true);

    Friday, August 30, 2019 4:51 PM

All replies

  • Hi mike11111111233, 

    Thank you for posting here.

    According to your description, I cannot reproduce your problem.

    Could you provide some related code or an little example here?  It will help us to analyze your problem and make a test.

    We are waiting for your update.

    Best Regards,

    Xingyu Zhao

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Monday, September 2, 2019 7:06 AM