void HandleAccept() { int error = 0; while (error == 0) { IntPtr clientTlsContext; SocketInfo socketInfo; error = manos_tls_accept(tlsContext, out clientTlsContext, out socketInfo); if (error == 0) { var socket = new SecureSocket(parent.Context, socketInfo, clientTlsContext); parent.acceptCallback(socket); } } }
public override void Close() { if (parent == null) { return; } RaiseEndOfStream(); int res = manos_tls_close(tlsContext); if (res < 0) { Console.Error.WriteLine("Error '{0}' closing socket: {1}", res, Handle.ToInt32()); Console.Error.WriteLine(Environment.StackTrace); } receiveBuffer = null; parent = null; base.Close(); }
public SecureSocketStream(SecureSocket parent, IntPtr handle, IntPtr tlsContext) : base(parent.Context, handle) { this.parent = parent; this.tlsContext = tlsContext; }
void HandleAccept() { int error = 0; while (error == 0) { IntPtr clientTlsContext; SocketInfo socketInfo; error = manos_tls_accept (tlsContext, out clientTlsContext, out socketInfo); if (error == 0) { var socket = new SecureSocket (parent.Loop, socketInfo, clientTlsContext); parent.acceptCallback (socket); } } }
public override void Close() { if (parent == null) { return; } RaiseEndOfStream (); int res = manos_tls_close (tlsContext); if (res < 0) { Console.Error.WriteLine ("Error '{0}' closing socket: {1}", res, Handle.ToInt32 ()); Console.Error.WriteLine (Environment.StackTrace); } receiveBuffer = null; parent = null; base.Close (); }
public SecureSocketStream(SecureSocket parent, IntPtr handle, IntPtr tlsContext) : base(parent.Loop, handle) { this.parent = parent; this.tlsContext = tlsContext; }