Drag[en]gine Script Module DragonScript  1.23
Dragengine.Networking.Server Class Reference

Server. More...

Inheritance diagram for Dragengine.Networking.Server:

Public Member Functions

Constructors
Server new ()
 Create server. More...
 
Management
String getAddress ()
 Network address. More...
 
bool listenOn (String address)
 Start listening on address for incoming connections. More...
 
void stopListening ()
 Stop listening. More...
 
ServerListener getServerListener ()
 Server listener or null if not set. More...
 
void setServerListener (ServerListener listener)
 Set server listener or null if not set. More...
 

Detailed Description

Server.

This is a native class.

Member Function Documentation

◆ getAddress()

String Dragengine.Networking.Server.getAddress ( )

Network address.

◆ getServerListener()

ServerListener Dragengine.Networking.Server.getServerListener ( )

Server listener or null if not set.

◆ listenOn()

bool Dragengine.Networking.Server.listenOn ( String  address)

Start listening on address for incoming connections.

The format of the address is specific to the network module. For common TCP based network modules URL, IPv4 and IPv6 addresses are supported with optional port appended by a colon (for example "url:3413" or "192.168.1.100:3413". If the port is not specified 3413 is used (comes from "Drag[en]gine Network" short DEN using alphabetic position). All modules support the special address "*" which picks the best listening address supported by the module (if port is supported "*:port"). For TCP based network modules this is the best (or first) public address found. In special situations it can be required to pick an address yourself.

Returns
true if listening or false in case of error.

◆ new()

Server Dragengine.Networking.Server.new ( )

Create server.

◆ setServerListener()

void Dragengine.Networking.Server.setServerListener ( ServerListener  listener)

Set server listener or null if not set.

◆ stopListening()

void Dragengine.Networking.Server.stopListening ( )

Stop listening.


The documentation for this class was generated from the following file: