WebSocketClient

A WebSocket client implementation

This class implements a WebSocket client compatible with any RFC 6455 complaint WebSocket server. This client can be optionally used as a network peer for the MultiplayerAPI. After starting the client (connectToUrl), you will need to NetworkedMultiplayerPeer.poll it at regular intervals (e.g. inside Node._process). You will received appropriate signals when connecting, disconnecting, or when new data is available.

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

connectToUrl
GodotError connectToUrl(StringArg0 url, PoolStringArray protocols, bool gd_mp_api)

Connect to the given URL requesting one of the given protocols as sub-protocol. If true is passed as gd_mp_api, the client will behave like a network peer for the MultiplayerAPI. Note: connections to non Godot servers will not work, and dataReceived will not be emitted when this option is true.

disconnectFromHost
void disconnectFromHost(long code, StringArg1 reason)

Disconnect this client from the connected host. See WebSocketPeer.close for more info.

isVerifySslEnabled
bool isVerifySslEnabled()
opAssign
WebSocketClient opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(WebSocketClient other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setVerifySslEnabled
void setVerifySslEnabled(bool enabled)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

verifySsl
bool verifySsl [@property getter]
bool verifySsl [@property setter]

Enable or disable SSL certificate verification. Note: You must specify the certificates to be used in the project settings for it to work when exported.

Static functions

_new
WebSocketClient _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta