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