public ConnectionTester() { var serverEndpoint = new IPEndPoint(IPAddress.Loopback, 12000); using var server = new SocketServer(serverEndpoint); var connected = SocketMessenger.CreateAndConnect(serverEndpoint); a = server.Accept().Result.Value; b = connected.Result; }
public ProtectionTester() { var serverEndpoint = new IPEndPoint(IPAddress.Loopback, 12000); using var server = new SocketServer(serverEndpoint); var connected = SocketMessenger.CreateAndConnect(serverEndpoint); var socket1 = server.Accept().Result.Value; var socket2 = connected.Result; var a = Protector.Protect(socket1, false); var b = Protector.Protect(socket2, true); protected1 = a.Result; protected2 = b.Result; }