using System;
using System.ComponentModel;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using Cpp2IlInjected;
namespace System.Net.WebSockets
{
/// The WebSocket class allows applications to send and receive data after the WebSocket upgrade has completed.
// Token: 0x0200032A RID: 810
[Token(Token = "0x200032A")]
public abstract class WebSocket : IDisposable
{
/// Returns the current state of the WebSocket connection.
/// The current state of the WebSocket connection.
// Token: 0x17000443 RID: 1091
// (get) Token: 0x0600150B RID: 5387
[Token(Token = "0x17000443")]
public abstract WebSocketState State
{
[Token(Token = "0x600150B")]
[Address(Slot = "5")]
get;
}
/// Aborts the WebSocket connection and cancels any pending IO operations.
// Token: 0x0600150C RID: 5388
[Token(Token = "0x600150C")]
[Address(Slot = "6")]
public abstract void Abort();
/// Initiates or completes the close handshake defined in the WebSocket protocol specification section 7.
/// 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.
/// The task object representing the asynchronous operation.
// Token: 0x0600150D RID: 5389
[Token(Token = "0x600150D")]
[Address(Slot = "7")]
public abstract Task CloseOutputAsync(WebSocketCloseStatus closeStatus, string statusDescription, CancellationToken cancellationToken);
/// Used to clean up unmanaged resources for ASP.NET and self-hosted implementations.
// Token: 0x0600150E RID: 5390
[Token(Token = "0x600150E")]
[Address(Slot = "8")]
public abstract void Dispose();
/// Receives data from the connection asynchronously.
/// References the application buffer that is the storage location for the received data.
/// Propagates the notification that operations should be canceled.
/// The task object representing the asynchronous operation. The property on the task object returns a array containing the received data.
// Token: 0x0600150F RID: 5391
[Token(Token = "0x600150F")]
[Address(Slot = "9")]
public abstract Task ReceiveAsync(ArraySegment buffer, CancellationToken cancellationToken);
/// Sends data over the connection asynchronously.
/// 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.
/// The task object representing the asynchronous operation.
// Token: 0x06001510 RID: 5392
[Token(Token = "0x6001510")]
[Address(Slot = "10")]
public abstract Task SendAsync(ArraySegment buffer, WebSocketMessageType messageType, bool endOfMessage, CancellationToken cancellationToken);
/// Gets the default WebSocket protocol keep-alive interval.
/// The default WebSocket protocol keep-alive interval. The typical value for this interval is 30 seconds (as defined by the OS or the .NET platform). It is used to initialize value.
// Token: 0x17000444 RID: 1092
// (get) Token: 0x06001511 RID: 5393 RVA: 0x00009618 File Offset: 0x00007818
[Token(Token = "0x17000444")]
public static TimeSpan DefaultKeepAliveInterval
{
[Token(Token = "0x6001511")]
[Address(RVA = "0x40C170", Offset = "0x40AF70", VA = "0x18040C170")]
get
{
return default(TimeSpan);
}
}
/// Allows callers to create a client side WebSocket class which will use the WSPC for framing purposes.
/// 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).
/// Returns .
// Token: 0x06001512 RID: 5394 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6001512")]
[Address(RVA = "0x40BD60", Offset = "0x40AB60", VA = "0x18040BD60")]
[EditorBrowsable(EditorBrowsableState.Never)]
public static WebSocket CreateClientWebSocket(Stream innerStream, string subProtocol, int receiveBufferSize, int sendBufferSize, TimeSpan keepAliveInterval, bool useZeroMaskingKey, ArraySegment internalBuffer)
{
return null;
}
/// Creates an instance of the class.
// Token: 0x06001513 RID: 5395 RVA: 0x00002053 File Offset: 0x00000253
[Token(Token = "0x6001513")]
[Address(RVA = "0x3F5100", Offset = "0x3F3F00", VA = "0x1803F5100")]
protected WebSocket()
{
}
}
}