/// <summary> /// Shutdown the network client /// </summary> public void Shutdown() { Log.Information("stopping Client NetworkSocket..."); NetworkSocket?.Shutdown("Client application exited"); NetworkSocket = null; NetConfiguration = null; MessagePipe = null; }
public override void Start() { Log.Information("Started logging NetworkClient."); NetConfiguration = new NetPeerConfiguration("unity"); NetworkSocket = new NetClient(NetConfiguration); MessagePipe = new ClientMessagePipe(NetworkSocket); NetworkSocket.RegisterReceivedCallback(new SendOrPostCallback(Message)); NetworkSocket.Start(); Log.Information("NetworkClient initialised"); }