Drag[en]gine Script Module DragonScript Script API  1.0
Server Class Reference

Server. More...

Inheritance diagram for 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...
 
Worlds
int getWorldCount ()
 Number of worlds. More...
 
World getWorldAt (int index)
 World at index. More...
 
void addWorld (World world)
 Add world. More...
 
void removeWorld (World world)
 Remove world. More...
 
void removeAllWorlds ()
 Remove all worlds. More...
 

Detailed Description

Server.

This is a native class.

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ addWorld()

void addWorld ( World  world)

Add world.

§ getAddress()

String getAddress ( )

Network address.

§ getServerListener()

ServerListener getServerListener ( )

Server listener or null if not set.

§ getWorldAt()

World getWorldAt ( int  index)

World at index.

Exceptions
EOutOfBoundaryindex is less than 0 or greater than or equal to getWorldCount().

§ getWorldCount()

int getWorldCount ( )

Number of worlds.

§ listenOn()

bool listenOn ( String  address)

Start listening on address for incoming connections.

The format of the address is specific to the network module.

Returns
true if listening or false in case of error.

§ new()

Server new ( )

Create server.

§ removeAllWorlds()

void removeAllWorlds ( )

Remove all worlds.

§ removeWorld()

void removeWorld ( World  world)

Remove world.

§ setServerListener()

void setServerListener ( ServerListener  listener)

Set server listener or null if not set.

§ stopListening()

void stopListening ( )

Stop listening.


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