WebSocket
Overview
The WebSocket object provides the API for creating and managing a WebSocket connection to a server, as well as for sending and receiving data on the connection.
Location
- Reference: Island.fx
- Namespace: RemObjects.Elements.WebAssembly.DOM
- Platforms: WebAssembly
- Ancestry: EventTarget | WebSocket
binaryType
property binaryType: String read write;
String binaryType { get; set; }
var binaryType: String { get{} set{} }
String binaryType { __get; __set; }
Property binaryType() As String
bufferedAmount
property bufferedAmount: Double read;
Double bufferedAmount { get; }
var bufferedAmount: Double { get{} }
Double bufferedAmount { __get; }
ReadOnly Property bufferedAmount() As Double
close
The WebSocket.close() method closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing.
method close(code: Int32; reason: dynamic)
void close(Int32 code, dynamic reason)
func close(_ code: Int32, _ reason: dynamic)
void close(Int32 code, dynamic reason)
Sub close(code As Int32, reason As dynamic)
Parameters:
- code:
- reason:
extensions
property extensions: String read;
String extensions { get; }
var extensions: String { get{} }
String extensions { __get; }
ReadOnly Property extensions() As String
onclose
property onclose: WebAssemblyDelegate read write;
WebAssemblyDelegate onclose { get; set; }
var onclose: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onclose { __get; __set; }
Property onclose() As WebAssemblyDelegate
onerror
property onerror: WebAssemblyDelegate read write;
WebAssemblyDelegate onerror { get; set; }
var onerror: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onerror { __get; __set; }
Property onerror() As WebAssemblyDelegate
onmessage
property onmessage: WebAssemblyDelegate read write;
WebAssemblyDelegate onmessage { get; set; }
var onmessage: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onmessage { __get; __set; }
Property onmessage() As WebAssemblyDelegate
onopen
property onopen: WebAssemblyDelegate read write;
WebAssemblyDelegate onopen { get; set; }
var onopen: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onopen { __get; __set; }
Property onopen() As WebAssemblyDelegate
protocol
property protocol: String read;
String protocol { get; }
var protocol: String { get{} }
String protocol { __get; }
ReadOnly Property protocol() As String
readyState
property readyState: Byte read;
Byte readyState { get; }
var readyState: Byte { get{} }
Byte readyState { __get; }
ReadOnly Property readyState() As Byte
send
The WebSocket.send() method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of bufferedAmount by the number of bytes needed to contain the data. If the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically.
method send(data: dynamic)
void send(dynamic data)
func send(_ data: dynamic)
void send(dynamic data)
Sub send(data As dynamic)
Parameters:
- data:
url
binaryType
property binaryType: String read write;
String binaryType { get; set; }
var binaryType: String { get{} set{} }
String binaryType { __get; __set; }
Property binaryType() As String
bufferedAmount
property bufferedAmount: Double read;
Double bufferedAmount { get; }
var bufferedAmount: Double { get{} }
Double bufferedAmount { __get; }
ReadOnly Property bufferedAmount() As Double
extensions
property extensions: String read;
String extensions { get; }
var extensions: String { get{} }
String extensions { __get; }
ReadOnly Property extensions() As String
onclose
property onclose: WebAssemblyDelegate read write;
WebAssemblyDelegate onclose { get; set; }
var onclose: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onclose { __get; __set; }
Property onclose() As WebAssemblyDelegate
onerror
property onerror: WebAssemblyDelegate read write;
WebAssemblyDelegate onerror { get; set; }
var onerror: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onerror { __get; __set; }
Property onerror() As WebAssemblyDelegate
onmessage
property onmessage: WebAssemblyDelegate read write;
WebAssemblyDelegate onmessage { get; set; }
var onmessage: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onmessage { __get; __set; }
Property onmessage() As WebAssemblyDelegate
onopen
property onopen: WebAssemblyDelegate read write;
WebAssemblyDelegate onopen { get; set; }
var onopen: WebAssemblyDelegate { get{} set{} }
WebAssemblyDelegate onopen { __get; __set; }
Property onopen() As WebAssemblyDelegate
protocol
property protocol: String read;
String protocol { get; }
var protocol: String { get{} }
String protocol { __get; }
ReadOnly Property protocol() As String
readyState
property readyState: Byte read;
Byte readyState { get; }
var readyState: Byte { get{} }
Byte readyState { __get; }
ReadOnly Property readyState() As Byte
url
close
The WebSocket.close() method closes the WebSocket connection or connection attempt, if any. If the connection is already CLOSED, this method does nothing.
method close(code: Int32; reason: dynamic)
void close(Int32 code, dynamic reason)
func close(_ code: Int32, _ reason: dynamic)
void close(Int32 code, dynamic reason)
Sub close(code As Int32, reason As dynamic)
Parameters:
- code:
- reason:
send
The WebSocket.send() method enqueues the specified data to be transmitted to the server over the WebSocket connection, increasing the value of bufferedAmount by the number of bytes needed to contain the data. If the data can't be sent (for example, because it needs to be buffered but the buffer is full), the socket is closed automatically.
method send(data: dynamic)
void send(dynamic data)
func send(_ data: dynamic)
void send(dynamic data)
Sub send(data As dynamic)
Parameters:
- data: