public void Run() { try { MockPskTlsServer server = new MockPskTlsServer(); TlsServerProtocol serverProtocol = new TlsServerProtocol(s.GetStream(), secureRandom); serverProtocol.Accept(server); Stream log = new TeeOutputStream(serverProtocol.Stream, stdout); Streams.PipeAll(serverProtocol.Stream, log); serverProtocol.Close(); } finally { try { s.Close(); } catch (IOException) { } finally { } } }
public void Run() { try { MockPskTlsServer server = new MockPskTlsServer(); mServerProtocol.Accept(server); Streams.PipeAll(mServerProtocol.Stream, mServerProtocol.Stream); mServerProtocol.Close(); } catch (Exception) { //throw new RuntimeException(e); } }