ReadonlybinaryThe type of binary data being used.
ReadonlybufferedThe amount of buffered data.
ReadonlyhostThe remote host.
Event handler for socket close.
Event handler for incoming data.
Event handler for when the buffer drains.
Event handler for errors.
Event handler for when the socket opens.
ReadonlyportThe remote port.
ReadonlyreadyThe current state of the socket.
ReadonlysslWhether the connection is secure.
The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.
Optionaloptions: boolean | AddEventListenerOptionsCloses the socket.
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target.
Optionaloptions: boolean | EventListenerOptionsSuspends the socket, stopping data events.
Represents a TCP socket connection. Available only if "mozilla::dom::TCPSocket::ShouldTCPSocketExist" is true. Exposed to: Window, System