71 references to WebSocketHelper
System.ServiceModel.Http (71)
System\ServiceModel\Channels\HttpChannelFactory.cs (5)
131
WebSocketSettings =
WebSocketHelper
.GetRuntimeWebSocketSettings(bindingElement.WebSocketSettings);
497
remoteAddress = remoteAddress != null && !
WebSocketHelper
.IsWebSocketUri(remoteAddress.Uri) ?
498
new EndpointAddress(
WebSocketHelper
.NormalizeHttpSchemeWithWsScheme(remoteAddress.Uri), remoteAddress) :
500
via = !
WebSocketHelper
.IsWebSocketUri(via) ?
WebSocketHelper
.NormalizeHttpSchemeWithWsScheme(via) : via;
System\ServiceModel\Channels\WebSocketHelper.cs (5)
51
(
WebSocketHelper
.SchemeWs.Equals(uri.Scheme, StringComparison.OrdinalIgnoreCase) ||
52
WebSocketHelper
.SchemeWss.Equals(uri.Scheme, StringComparison.OrdinalIgnoreCase));
221
case
WebSocketHelper
.CloseOperation:
224
case
WebSocketHelper
.SendOperation:
227
case
WebSocketHelper
.ReceiveOperation:
System\ServiceModel\Channels\WebSocketTransportDuplexSessionChannel.cs (59)
23
private int _cleanupStatus =
WebSocketHelper
.OperationNotStarted;
83
closeTask.Wait(timeout,
WebSocketHelper
.ThrowCorrectException,
WebSocketHelper
.CloseOperation);
102
task.Wait(timeout,
WebSocketHelper
.ThrowCorrectException,
WebSocketHelper
.CloseOperation);
133
throw
WebSocketHelper
.ConvertAndTraceException(ex, timeout,
WebSocketHelper
.ReceiveOperation);
191
_pendingWritingMessageException =
WebSocketHelper
.CreateExceptionOnTaskFailure(task, timeout,
WebSocketHelper
.SendOperation);
237
_pendingWritingMessageException =
WebSocketHelper
.CreateExceptionOnTaskFailure(task, timeout,
WebSocketHelper
.CloseOperation);
274
task.Wait(helper.RemainingTime(),
WebSocketHelper
.ThrowCorrectException,
WebSocketHelper
.SendOperation);
309
if (Interlocked.CompareExchange(ref _cleanupStatus,
WebSocketHelper
.OperationFinished,
WebSocketHelper
.OperationNotStarted) ==
WebSocketHelper
.OperationNotStarted)
317
Fx.Assert(_cleanupStatus ==
WebSocketHelper
.OperationFinished,
354
throw
WebSocketHelper
.ConvertAndTraceException(e);
371
throw
WebSocketHelper
.ConvertAndTraceException(e);
388
_pendingWritingMessageException =
WebSocketHelper
.CreateExceptionOnTaskFailure(task, timeout,
WebSocketHelper
.CloseOperation);
404
_pendingWritingMessageException =
WebSocketHelper
.CreateExceptionOnTaskFailure(task, timeout,
405
WebSocketHelper
.SendOperation);
478
_receiveBufferSize = Math.Min(
WebSocketHelper
.GetReceiveBufferSize(_maxReceivedMessageSize), _maxBufferSize);
586
WebSocketHelper
.ThrowCorrectException(ex, TimeSpan.MaxValue,
WebSocketHelper
.ReceiveOperation);
616
_pendingException =
WebSocketHelper
.ConvertAndTraceException(ex, TimeSpan.MaxValue,
WebSocketHelper
.ReceiveOperation);
753
WebSocketHelper
.ThrowCorrectException(ex, _asyncReceiveTimeout,
WebSocketHelper
.ReceiveOperation);
764
_pendingException =
WebSocketHelper
.ConvertAndTraceException(ex, _asyncReceiveTimeout,
WebSocketHelper
.ReceiveOperation);
891
_messageSourceCleanState =
WebSocketHelper
.OperationNotStarted;
892
_endOfMessageWritten =
WebSocketHelper
.OperationNotStarted;
904
_messageSourceCleanState =
WebSocketHelper
.OperationFinished;
996
throw FxTrace.Exception.AsError(
WebSocketHelper
.GetTimeoutException(null,
997
_readTimeoutHelper.OriginalTimeout,
WebSocketHelper
.ReceiveOperation));
1046
throw
WebSocketHelper
.ConvertAndTraceException(ex, new TimeSpan(ReadTimeout),
WebSocketHelper
.ReceiveOperation);
1097
if (_endOfMessageWritten ==
WebSocketHelper
.OperationFinished)
1126
throw
WebSocketHelper
.ConvertAndTraceException(ex, new TimeSpan(WriteTimeout),
WebSocketHelper
.SendOperation);
1153
if (Interlocked.CompareExchange(ref _endOfMessageWritten,
WebSocketHelper
.OperationFinished,
WebSocketHelper
.OperationNotStarted) ==
WebSocketHelper
.OperationNotStarted)
1156
task.Wait(timeoutHelper.RemainingTime(),
WebSocketHelper
.ThrowCorrectException,
WebSocketHelper
.SendOperation);
1201
throw
WebSocketHelper
.ConvertAndTraceException(ex, timeoutHelper.OriginalTimeout,
1202
WebSocketHelper
.SendOperation);
1231
if (Interlocked.CompareExchange(ref _messageSourceCleanState,
WebSocketHelper
.OperationFinished,
WebSocketHelper
.OperationNotStarted) ==
WebSocketHelper
.OperationNotStarted)
1246
WebSocketHelper
.ThrowCorrectException,
WebSocketHelper
.ReceiveOperation);
1263
pendingException =
WebSocketHelper
.ConvertAndTraceException(ex, _closeTimeout,
WebSocketHelper
.CloseOperation);
1273
if (Interlocked.CompareExchange(ref _endOfMessageWritten,
WebSocketHelper
.OperationFinished,
WebSocketHelper
.OperationNotStarted) ==
WebSocketHelper
.OperationNotStarted)
System\ServiceModel\Channels\WebSocketTransportSettings.cs (2)
104
if (value.Split(
WebSocketHelper
.ProtocolSeparators).Length > 1)
110
if (
WebSocketHelper
.IsSubProtocolInvalid(value, out invalidChar))