コード例 #1
0
        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;
        }
コード例 #2
0
 internal void Register(TcpServerChannel.IServerNativeUnsafe serverChannel)
 {
     Debug.Assert(serverChannel != null);
     this.nativeUnsafe = serverChannel;
 }
コード例 #3
0
 protected override void OnClosed()
 {
     this.nativeUnsafe = null;
     base.OnClosed();
 }