I want to send UDP messages every 50ms by using
UDPConnection.SendObject( newMessageType, data, serverIP, serverPort );
but i get the following error below. If is simply replace UDP by the TCP send command it works.
ObjectDisposedException: The object was used after being disposed.
System.Net.Sockets.UdpClient.CheckDisposed ()
System.Net.Sockets.UdpClient.Send (System.Byte[] dgram, Int32 bytes, System.Net.IPEndPoint endPoint)
NetworkCommsDotNet.UdpClientThreadSafe.Send (System.Byte[] dgram, Int32 bytes, System.Net.IPEndPoint endPoint)
NetworkCommsDotNet.UDPConnection.SendPacketSpecific (NetworkCommsDotNet.Packet packet, System.Net.IPEndPoint ipEndPoint)
NetworkCommsDotNet.UDPConnection.SendObject (System.String sendingPacketType, System.Object objectToSend, System.Net.IPEndPoint ipEndPoint, NetworkCommsDotNet.SendReceiveOptions sendReceiveOptions)
NetworkCommsDotNet.UDPConnection.SendObject (System.String sendingPacketType, System.Object objectToSend, System.Net.IPEndPoint ipEndPoint)
NetworkCommsDotNet.UDPConnection.SendObject (System.String sendingPacketType, System.Object objectToSend, System.String ipAddress, Int32 port)
Client.SendUDP (Int32 messageType, System.Object data) (at Assets/Scripts/Client.cs:251)
Client.SendClientPosition () (at Assets/Scripts/Client.cs:222)
Client.ClientProcess () (at Assets/Scripts/Client.cs:132)
Client.FixedUpdate () (at Assets/Scripts/Client.cs:124)