public void Dispose() { Disposes.Dispose(); Clients.ForEach(x => { x.Close(); x.Dispose(); }); Server?.Close(); Server?.Dispose(); }
private static void TestService() { Server s = new Server(new SimpleWrapperService <TestObject>(new TestObject())); s.Bind("tcp://127.0.0.1:1234"); Console.WriteLine("Server started"); s.Error += (sender, errorArgs) => { Console.WriteLine($"Error: {errorArgs.Info}"); }; Console.Read(); Console.WriteLine("Closing"); s.Close(TimeSpan.Zero); s.Dispose(); }
public void Dispose() { Client.Close(); Server.Close(); Listener.Stop(); }