System 4.0.0.0 System.Object System.IDisposable

Some of the classes in the namespace are supported on Windows 7, Windows Vista SP2, and Windows Server 2008. However, the only public implementations of client and server WebSockets are supported on Windows 8 and Windows Server 2012. The classes and class elements in the namespace that are supported on Windows 7, Windows Vista SP2, and Windows Server 2008 are abstract classes. This allows an application developer to inherit and extend these abstract classes with an actual implementation of client WebSockets.

The WebSocket class allows applications to send and receive data after the WebSocket upgrade has completed.

- Constructor
  4.0.0.0
  To be added.

  Creates an instance of the class.

- Method
  4.0.0.0
  System.Void To be added.

  Aborts the WebSocket connection and cancels any pending IO operations.

- Method
  4.0.0.0
  System.Threading.Tasks.Task `` `` ``

  This operation will not block. The returned object will complete after the WebSocket has been closed.

  This method closes the WebSocket connection using the close handshake defined in the WebSocket protocol specification section 7.

  Closes the WebSocket connection as an asynchronous operation using the close handshake defined in the WebSocket protocol specification section 7.

  Returns .

  The task object representing the asynchronous operation.

  Indicates the reason for closing the WebSocket connection. Specifies a human readable explanation as to why the connection is closed. The token that can be used to propagate notification that operations should be canceled.
- Method
  4.0.0.0
  System.Threading.Tasks.Task `` `` ``

  This operation will not block. The returned object will complete after the output on the WebSocket has been closed.

  Initiates or completes the close handshake defined in the WebSocket protocol specification section 7.

  Returns .

  The task object representing the asynchronous operation.

  Indicates the reason for closing the WebSocket connection. Allows applications to specify a human readable explanation as to why the connection is closed. The token that can be used to propagate notification that operations should be canceled.
- Property
  4.0.0.0
  System.Nullable<System.Net.WebSockets.WebSocketCloseStatus> To be added.

  If the close handshake has not been initiated yet, WebSocketCloseStatus.None is returned.

  Indicates the reason why the remote endpoint initiated the close handshake.

- Property
  4.0.0.0
  System.String To be added. To be added.

  Allows the remote endpoint to describe the reason why the connection was closed.

- Method
  4.0.0.0
  System.MonoTODO
  System.ArraySegment<System.Byte> `` `` To be added.

  Create client buffers to use with this instance.

  Returns .

  An array with the client buffers.

  The size, in bytes, of the client receive buffer. The size, in bytes, of the send buffer.
- Method
  4.0.0.0
  System.MonoTODO
  System.Net.WebSockets.WebSocket `` `` `` `` `` `` `` To be added.

  This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

  Allows callers to create a client side WebSocket class which will use the WSPC for framing purposes.

  Returns .

  The connection to be used for IO operations. The subprotocol accepted by the client. The size in bytes of the client WebSocket receive buffer. The size in bytes of the client WebSocket send buffer. Determines how regularly a frame is sent over the connection as a keep-alive. Applies only when the connection is idle. Indicates whether a random key or a static key (just zeros) should be used for the WebSocket masking. Will be used as the internal buffer in the WPC. The size has to be at least 2 * ReceiveBufferSize + SendBufferSize + 256 + 20 (16 on 32-bit).
- Method
  4.0.0.0
  System.MonoTODO
  System.ArraySegment<System.Byte> `` To be added.

  Creates a WebSocket server buffer.

  Returns .

  The size, in bytes, of the desired buffer.
- Property
  4.0.0.0
  System.MonoTODO
  System.TimeSpan To be added. To be added.

  Gets the default WebSocket protocol keep-alive interval in milliseconds.

- Method
  4.0.0.0
  System.Void To be added.

  Used to clean up unmanaged resources for ASP.NET and self-hosted implementations.

- Method
  4.0.0.0
  System.MonoTODO
  System.Obsolete
  System.Boolean To be added.

  Returns a value that indicates if the WebSocket instance is targeting net_v45.

  Returns .

  true if the is targeting net_v45; otherwise false.

- Method
  4.0.0.0
  System.Boolean `` To be added.

  Returns a value that indicates if the state of the WebSocket instance is closed or aborted.

  Returns .

  true if the is closed or aborted; otherwise false.

  The current state of the WebSocket.
- Method
  4.0.0.0
  System.Threading.Tasks.Task<System.Net.WebSockets.WebSocketReceiveResult> `` ``

  This operation will not block. The returned object will complete after the data has been received on the WebSocket.

  Receives data from the WebSocket connection asynchronously.

  Returns .

  The task object representing the asynchronous operation. The property on the task object returns a array containing the received data.

  References the application buffer that is the storage location for the received data. Propagate the notification that operations should be canceled.
- Method
  4.0.0.0
  System.MonoTODO
  System.Void To be added.

  This API supports the .NET Framework infrastructure and is not intended to be used directly from your code. Allows callers to register prefixes for WebSocket requests (ws and wss).

- Method
  4.0.0.0
  System.Threading.Tasks.Task `` `` `` ``

  This operation will not block. The returned object will complete after the data has been sent on the WebSocket.

  Sends data over the WebSocket connection asynchronously.

  Returns .

  The task object representing the asynchronous operation.

  The buffer to be sent over the connection. Indicates whether the application is sending a binary or text message. Indicates whether the data in “buffer” is the last part of a message. The token that propagates the notification that operations should be canceled.
- Property
  4.0.0.0
  System.Net.WebSockets.WebSocketState To be added. To be added.

  Returns the current state of the WebSocket connection.

- Property
  4.0.0.0
  System.String To be added. To be added.

  The subprotocol that was negotiated during the opening handshake.

- Method
  4.0.0.0
  System.MonoTODO
  System.Void `` `System.ParamArray` To be added.

  Verifies that the connection is in an expected state.

  The current state of the WebSocket to be tested against the list of valid states. List of valid connection states.