AndyMcoy
AndyMcoy

Reputation: 361

Where is the exception info for WebSocket.ReceiveAsync?

I'm seeing various exception types being thrown by calls to WebSocket.ReceiveAsync (HttpListenerException, WebsocketException) but the MSDN page for the ReceiveAsync method makes no mention of what exceptions might be thrown.

Where can I find exception information for WebSocket.ReceiveAsync ?

Upvotes: 0

Views: 760

Answers (1)

Panagiotis Kanavos
Panagiotis Kanavos

Reputation: 131423

That's an abstract method, it can't throw anything. The implementations in the concrete classes, ClientWebSocket.ReceiveAsync and (for .NET Framework only) AspNetWebSocket.ReceiveAsync show that the methods can throw InvalidOperationException or ObjectDisposedException

Upvotes: 2

Related Questions