AspNetWebSocket Class

.NET Framework 4.5

Represents a real-time full-duplex connection between a web server and a client in an ASP.NET application.

System.Object
  System.Net.WebSockets.WebSocket
    System.Web.WebSockets.AspNetWebSocket

Namespace:  System.Web.WebSockets
Assembly:  System.Web (in System.Web.dll)

public sealed class AspNetWebSocket : WebSocket

The AspNetWebSocket type exposes the following members.

  NameDescription
Public propertyCloseStatusGets a status code that indicates why an AspNetWebSocket object was closed. (Overrides WebSocket.CloseStatus.)
Public propertyCloseStatusDescriptionGets a status message that explains why an AspNetWebSocket object was closed. (Overrides WebSocket.CloseStatusDescription.)
Public propertyStateGets a value that indicates the open or closed state of an AspNetWebSocket object. (Overrides WebSocket.State.)
Public propertySubProtocolGets the name of an application-specific protocol that a remote client and a server can use to exchange data over an AspNetWebSocket connection. (Overrides WebSocket.SubProtocol.)
Top

  NameDescription
Public methodAbortCancels any pending I/O operations on the AspNetWebSocket object and sets the state of the object so that it cannot be used to start additional I/O operations. (Overrides WebSocket.Abort().)
Public methodCloseAsyncSends an asynchronous message to a client to close the connection. If the server initiates the request to close the connection, the method waits for the client to acknowledge the request before it returns. (Overrides WebSocket.CloseAsync(WebSocketCloseStatus, String, CancellationToken).)
Public methodCloseOutputAsyncSends an asynchronous message to a client to close the connection. If the server initiates the request to close the connection, the method returns without waiting for a response. (Overrides WebSocket.CloseOutputAsync(WebSocketCloseStatus, String, CancellationToken).)
Public methodDisposeReleases all resources used by an AspNetWebSocket object. (Overrides WebSocket.Dispose().)
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodReceiveAsyncReceives a single message fragment from a remote client. (Overrides WebSocket.ReceiveAsync(ArraySegment<Byte>, CancellationToken).)
Public methodSendAsyncSends a single message fragment to a remote client. (Overrides WebSocket.SendAsync(ArraySegment<Byte>, WebSocketMessageType, Boolean, CancellationToken).)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

.NET Framework

Supported in: 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft