BesterServer

Represents an instance of a Bester server.

Constructors

this
this(JSONValue config)

Constructs a new BesterServer with the given JSON configuration.

Members

Functions

addConnection
void addConnection(BesterConnection connection)

Adds a new Connection, connection, to the server.

addListener
void addListener(BesterListener listener)

Adds a listener, listener, to this server's listener set.

authenticate
bool authenticate(string username, string password)

Authenticate the user.

findHandler
MessageHandler findHandler(string payloadType)

Returns the MessageHandler object of the requested type.

getAdminInfo
JSONValue getAdminInfo()
Undocumented in source. Be warned that the author may not have intended to support it.
getClients
BesterConnection[] getClients(string[] usernames)

Returns a list of BesterConnection objects that match the usernames provided.

run
void run()

Start listen loop.

Static functions

isBuiltInCommand
bool isBuiltInCommand(string command)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

clients
BesterConnection[] clients;

Connected clients.

handlers
MessageHandler[] handlers;

Array of message handlers attached to this server.

listeners
BesterListener[] listeners;

Socket listeners for incoming connections.

Meta