Editar

Compartilhar via


AspNetWebSocket Class

Definition

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

public ref class AspNetWebSocket sealed : System::Net::WebSockets::WebSocket
public sealed class AspNetWebSocket : System.Net.WebSockets.WebSocket
type AspNetWebSocket = class
    inherit WebSocket
Public NotInheritable Class AspNetWebSocket
Inherits WebSocket
Inheritance
AspNetWebSocket

Properties

CloseStatus

Gets a status code that indicates why an AspNetWebSocket object was closed.

CloseStatusDescription

Gets a status message that explains why an AspNetWebSocket object was closed.

State

Gets a value that indicates the open or closed state of an AspNetWebSocket object.

SubProtocol

Gets the name of an application-specific protocol that a remote client and a server can use to exchange data over an AspNetWebSocket connection.

Methods

Abort()

Cancels 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.

CloseAsync(WebSocketCloseStatus, String, CancellationToken)

Sends 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.

CloseOutputAsync(WebSocketCloseStatus, String, CancellationToken)

Sends 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.

Dispose()

Releases all resources used by an AspNetWebSocket object.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ReceiveAsync(ArraySegment<Byte>, CancellationToken)

Receives a single message fragment from a remote client.

ReceiveAsync(Memory<Byte>, CancellationToken)

Receives data from the WebSocket connection asynchronously.

(Inherited from WebSocket)
SendAsync(ArraySegment<Byte>, WebSocketMessageType, Boolean, CancellationToken)

Sends a single message fragment to a remote client.

SendAsync(ReadOnlyMemory<Byte>, WebSocketMessageType, Boolean, CancellationToken)

Sends data over the WebSocket connection asynchronously.

(Inherited from WebSocket)
SendAsync(ReadOnlyMemory<Byte>, WebSocketMessageType, WebSocketMessageFlags, CancellationToken)

Sends data over the WebSocket connection asynchronously.

(Inherited from WebSocket)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to