Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ConnectAsyncCore()

async Task System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore ( Uri uri,
CancellationToken cancellationToken )
inlineprivate

Definition at line 93 of file ClientWebSocket.cs.

94 {
95 _innerWebSocket = new WebSocketHandle();
96 try
97 {
98 await _innerWebSocket.ConnectAsync(uri, cancellationToken, Options).ConfigureAwait(continueOnCapturedContext: false);
99 }
100 catch
101 {
102 Dispose();
103 throw;
104 }
105 if (Interlocked.CompareExchange(ref _state, 2, 1) != 1)
106 {
107 throw new ObjectDisposedException(GetType().FullName);
108 }
109 }
async Task ConnectAsync(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options)
static int CompareExchange(ref int location1, int value, int comparand)
new ConfiguredTaskAwaitable< TResult > ConfigureAwait(bool continueOnCapturedContext)
Definition Task.cs:226

References System.Net.WebSockets.ClientWebSocket._innerWebSocket, System.Net.WebSockets.ClientWebSocket._state, System.cancellationToken, System.Threading.Interlocked.CompareExchange(), System.Threading.Tasks.Task< TResult >.ConfigureAwait(), System.Net.WebSockets.WebSocketHandle.ConnectAsync(), System.Net.WebSockets.ClientWebSocket.Dispose(), System.FullName, and System.Net.WebSockets.ClientWebSocket.Options.

Referenced by System.Net.WebSockets.ClientWebSocket.ConnectAsync().