コード例 #1
0
        /// <summary>
        /// 关闭到客户端的连接而不发送响应。
        /// </summary>
        public void Close()
        {
            _closeAction?.Invoke();
            _closeAction = null;
#if net40
            _closeAsycAction?.Invoke();
            _closeAsycAction = null;
#endif
            _isClientConnectedAction = null;
        }
コード例 #2
0
 public Task CloseAsync(int closeStatus, CancellationToken cancel)
 {
     return CloseAsyncDelegate.Invoke(closeStatus, null, cancel);
 }
コード例 #3
0
 public Task CloseAsync(CancellationToken cancel)
 {
     return CloseAsyncDelegate.Invoke(0, null, cancel);
 }
コード例 #4
0
 public Task CloseAsync(int closeStatus, string closeDescription, CancellationToken cancel)
 {
     return CloseAsyncDelegate.Invoke(closeStatus, closeDescription, cancel);
 }