I'm trying to create a small udp server and client. I'm coding the log off functionality now, but for some reason I get a ObjectDisposedException.
Data msgToSend = new Data ();
msgToSend.cmdCommand = Command.Logout;
msgToSend.strName = strName;
msgToSend.strMessage = null;
byte[] b = msgToSend.ToByte ();
clientSocket.SendTo(b, 0, b.Length, SocketFlags.None, epServer);
clientSocket.Close();
The server receives the message. And then does what it is supposed to, but when I reach the clientSocket.Close() I get the exception.