.NET
Microsoft Technologies based on the .NET software framework.
3,841 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
if(socket.Connected)
{
socket.Send(buffer);
}
if the client is closed or disconnected socket.Send will throw an exception .how to avoid this?
You can’t. Until the send is attempted, the status of the connection is unknown.