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: 0x02000326 RID: 806 [Token(Token = "0x2000326")] public abstract class WebSocket : IDisposable { /// Returns the current state of the WebSocket connection. /// The current state of the WebSocket connection. // Token: 0x1700043F RID: 1087 // (get) Token: 0x060014F5 RID: 5365 [Token(Token = "0x1700043F")] public abstract WebSocketState State { [Token(Token = "0x60014F5")] [Address(Slot = "5")] get; } /// Aborts the WebSocket connection and cancels any pending IO operations. // Token: 0x060014F6 RID: 5366 [Token(Token = "0x60014F6")] [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: 0x060014F7 RID: 5367 [Token(Token = "0x60014F7")] [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: 0x060014F8 RID: 5368 [Token(Token = "0x60014F8")] [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: 0x060014F9 RID: 5369 [Token(Token = "0x60014F9")] [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: 0x060014FA RID: 5370 [Token(Token = "0x60014FA")] [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: 0x17000440 RID: 1088 // (get) Token: 0x060014FB RID: 5371 RVA: 0x00009600 File Offset: 0x00007800 [Token(Token = "0x17000440")] public static TimeSpan DefaultKeepAliveInterval { [Token(Token = "0x60014FB")] [Address(RVA = "0x77D820", Offset = "0x77C820", VA = "0x18077D820")] 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: 0x060014FC RID: 5372 RVA: 0x00002050 File Offset: 0x00000250 [Token(Token = "0x60014FC")] [Address(RVA = "0x77D410", Offset = "0x77C410", VA = "0x18077D410")] [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: 0x060014FD RID: 5373 RVA: 0x00002053 File Offset: 0x00000253 [Token(Token = "0x60014FD")] [Address(RVA = "0x412370", Offset = "0x411370", VA = "0x180412370")] protected WebSocket() { } } }