_Noray

Inherits: Node

A noray client for Godot.

Description

See: https://github.com/foxssake/noray

Properties

Type Name Default
String oid
String pid
int local_port

Methods

Return Type Name
int connect_to_host(String address, int port)
bool is_connected_to_host()
void disconnect_from_host()
int register_host()
int register_remote(int registrar_port, float timeout, float interval)
int connect_nat(String host_oid)
int connect_relay(String host_oid)

Signals

on_command ( String command, String data )

Emitted for any command received from noray.


on_connect_to_host ( )

Emitted when connected to noray.


on_disconnect_from_host ( )

Emitted when disconnected from noray.


on_oid ( String oid )

Emitted when an OpenID is received from noray.


on_pid ( String pid )

Emitted when a PrivateID is received from noray.


on_connect_nat ( String address, int port )

Emitted when a connect over NAT command is received from noray.


on_connect_relay ( String address, int port )

Emitted when a connect over relay command is received from noray.


Property Descriptions

String oid

Open ID.

read-only, this is set after registering as host.


String pid

Private ID.

read-only, this is set after registering as host.


int local_port

Registered local port.

This is the port that servers should listen on and the port that clients should bind to ( i.e. use as local port ), since this port has been registered with noray as part of this machine's external address, and this is the port over which any handshake happens.

read-only, this is set after registering remote.


Method Descriptions

int connect_to_host ( String address, int port )

Connect to noray at host.


bool is_connected_to_host ( )

Check if connected to any host.


void disconnect_from_host ( )

Disconnect from noray.

Does nothing if already disconnected.


int register_host ( )

Register as host.


int register_remote ( int registrar_port, float timeout, float interval )

Register remote address.


int connect_nat ( String host_oid )

Connect to a given host by OID over NAT.


int connect_relay ( String host_oid )

Connect to a given host by OID over relay.