Interface IWebSocketConnection
Inherited Members
System.IDisposable.Dispose()
Namespace: MediaBrowser.Controller.Net
Assembly: MediaBrowser.Controller.dll
Syntax
public interface IWebSocketConnection : IDisposable
Properties
Id
Gets the id.
Declaration
Guid Id { get; }
Property Value
Type | Description |
---|---|
System.Guid | The id. |
LastActivityDate
Gets the last activity date.
Declaration
DateTimeOffset LastActivityDate { get; }
Property Value
Type | Description |
---|---|
System.DateTimeOffset | The last activity date. |
OnReceive
Gets or sets the receive action.
Declaration
Func<WebSocketMessageInfo, Task> OnReceive { get; set; }
Property Value
Type | Description |
---|---|
System.Func<WebSocketMessageInfo, System.Threading.Tasks.Task> | The receive action. |
QueryString
Gets or sets the query string.
Declaration
QueryParamCollection QueryString { get; set; }
Property Value
Type | Description |
---|---|
QueryParamCollection | The query string. |
RemoteAddress
Gets the remote end point.
Declaration
IPAddress RemoteAddress { get; }
Property Value
Type | Description |
---|---|
System.Net.IPAddress | The remote end point. |
State
Gets the state.
Declaration
WebSocketState State { get; }
Property Value
Type | Description |
---|---|
System.Net.WebSockets.WebSocketState | The state. |
Url
Gets or sets the URL.
Declaration
string Url { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URL. |
User
Declaration
User User { get; }
Property Value
Type | Description |
---|---|
User |
Methods
SendAsync(ReadOnlyMemory<Byte>, CancellationToken)
Sends a message asynchronously.
Declaration
Task SendAsync(ReadOnlyMemory<byte> buffer, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Byte> | buffer | The buffer. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
SendAsync(ReadOnlyMemory<Char>, CancellationToken)
Sends a message asynchronously.
Declaration
Task SendAsync(ReadOnlyMemory<char> text, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
System.ReadOnlyMemory<System.Char> | text | The text. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | buffer |
SendAsync<T>(WebSocketMessage<T>, CancellationToken)
Sends a message asynchronously.
Declaration
Task SendAsync<T>(WebSocketMessage<T> message, CancellationToken cancellationToken)
Parameters
Type | Name | Description |
---|---|---|
WebSocketMessage<T> | message | The message. |
System.Threading.CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | Task. |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | message |
Events
Closed
Occurs when [closed].
Declaration
event EventHandler<EventArgs> Closed
Event Type
Type | Description |
---|---|
System.EventHandler<System.EventArgs> |