public void Listen(TcpServerChannel.IServerNativeUnsafe channel, int backlog) { Debug.Assert(channel != null && this.nativeUnsafe == null); Debug.Assert(backlog > 0); int result = NativeMethods.uv_listen(this.Handle, backlog, ConnectionCallback); NativeMethods.ThrowIfError(result); this.nativeUnsafe = channel; }
internal void Register(TcpServerChannel.IServerNativeUnsafe serverChannel) { Debug.Assert(serverChannel != null); this.nativeUnsafe = serverChannel; }
protected override void OnClosed() { this.nativeUnsafe = null; base.OnClosed(); }