LiteNode

Undocumented in source.

Constructors

this
this(HubServer server, JSONValue* additionalJson)
Undocumented in source.

Members

Functions

loop
void loop(HncomStream stream)
Undocumented in source. Be warned that the author may not have intended to support it.
receiveNodeInfo
Login.NodeInfo receiveNodeInfo(HncomStream stream)
Undocumented in source. Be warned that the author may not have intended to support it.
send
void send(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
send
void send(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
sendHubInfo
void sendHubInfo(HncomStream stream, Login.HubInfo packet)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

ready
bool ready;
Undocumented in source.
tid
std.concurrency.Tid tid;
Undocumented in source.

Inherited Members

From AbstractNode

id
uint id;
Undocumented in source.
stream
HncomStream stream;
Undocumented in source.
plugins
Login.NodeInfo.Plugin[] plugins;
Undocumented in source.
exchageInfo
void exchageInfo(HncomStream stream)
Undocumented in source. Be warned that the author may not have intended to support it.
sendHubInfo
void sendHubInfo(HncomStream stream, Login.HubInfo packet)
Undocumented in source.
receiveNodeInfo
Login.NodeInfo receiveNodeInfo(HncomStream stream)
Undocumented in source.
loop
void loop(HncomStream stream)
Undocumented in source.
send
void send(ubyte[] buffer)
Undocumented in source.
send
void send(ubyte[] buffer)
Undocumented in source. Be warned that the author may not have intended to support it.
name
string name [@property getter]

Gets the name of the node. The name is different for every node connected to hub and it should be used other nodes with the transfer function.

main
bool main [@property getter]

Indicates whether or not this is a main node. A main node is able to receive players without the use of the transfer function. Every hub should have at least one main node, otherwise every player that tries to connect will be disconnected with the 'end of stream' message.

max
uint max [@property getter]

Gets the highest number of players that can connect to the node.

online
uint online [@property getter]

Gets the number of players connected to the node.

full
bool full [@property getter]

Indicates whether the node is full.

worlds
shared(WorldSession)[] worlds [@property getter]

Gets the list of worlds loaded on the node.

latency
uint latency [@property getter]

Gets the node's latency (it may not be precise).

tps
float tps [@property getter]
ram
ulong ram [@property getter]
cpu
float cpu [@property getter]

Gets the node's usage, updated with the ResourcesUsage packet.

accepts
bool accepts(ubyte game, uint protocol)
Undocumented in source. Be warned that the author may not have intended to support it.
addPacket
Status.AddNode addPacket [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusLatency
void handleStatusLatency(Status.Latency packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusLog
void handleStatusLog(Status.Log packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusSendMessage
void handleStatusSendMessage(Status.SendMessage packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusUpdateMaxPlayers
void handleStatusUpdateMaxPlayers(Status.UpdateMaxPlayers packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusUpdateUsage
void handleStatusUpdateUsage(Status.UpdateUsage packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusUpdateLanguageFiles
void handleStatusUpdateLanguageFiles(Status.UpdateLanguageFiles packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusAddWorld
void handleStatusAddWorld(Status.AddWorld packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusRemoveWorld
void handleStatusRemoveWorld(Status.RemoveWorld packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusRemoveWorldGroup
void handleStatusRemoveWorldGroup(Status.RemoveWorldGroup packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusAddPlugin
void handleStatusAddPlugin(Status.AddPlugin packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handleStatusRemovePlugin
void handleStatusRemovePlugin(Status.RemovePlugin packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerKick
void handlePlayerKick(Player.Kick packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerTransfer
void handlePlayerTransfer(Player.Transfer packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerUpdateDisplayName
void handlePlayerUpdateDisplayName(Player.UpdateDisplayName packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerUpdateWorld
void handlePlayerUpdateWorld(Player.UpdateWorld packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerUpdatePermissionLevel
void handlePlayerUpdatePermissionLevel(Player.UpdatePermissionLevel packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerGamePacket
void handlePlayerGamePacket(Player.GamePacket packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerSerializedGamePacket
void handlePlayerSerializedGamePacket(Player.SerializedGamePacket packet)
Undocumented in source. Be warned that the author may not have intended to support it.
handlePlayerOrderedGamePacket
void handlePlayerOrderedGamePacket(Player.OrderedGamePacket packet)
Undocumented in source. Be warned that the author may not have intended to support it.
sendTo
void sendTo(PlayerSession player, ubyte[] data)

Sends data to the node received from a player.

remoteCommand
void remoteCommand(string command, ubyte origin, Address address, int commandId)

Executes a remote command.

addNode
void addNode(AbstractNode node)

Notifies the node that another node has connected to the hub.

removeNode
void removeNode(AbstractNode node)

Notifies the node that another node has been disconnected from the hub.

sendMessage
void sendMessage(uint sender, bool broadcasted, ubyte[] payload)

Sends a message to the node.

updatePlayers
void updatePlayers(uint online, uint max)

Sends the number of online players and maximum number of players to the node.

addPlayer
void addPlayer(PlayerSession player, ubyte reason, ubyte[] transferMessage)

Adds a player to the node.

onPlayerTransferred
void onPlayerTransferred(PlayerSession player)

Called when a player is transferred by the hub (not by the node) to another node.

onPlayerLeft
void onPlayerLeft(PlayerSession player)

Called when a player lefts the server using the disconnect button or closing the socket.

onPlayerTimedOut
void onPlayerTimedOut(PlayerSession player)

Called when a player times out.

onPlayerKicked
void onPlayerKicked(PlayerSession player)

Called when a player is kicked (not by the node).

onPlayerGone
void onPlayerGone(PlayerSession player, ubyte reason)

Generic function that removes a player from the node's list and sends a PlayerDisconnected packet to notify the node of the disconnection.

sendDisplayNameUpdate
void sendDisplayNameUpdate(PlayerSession player, string displayName)
Undocumented in source. Be warned that the author may not have intended to support it.
sendPermissionLevelUpdate
void sendPermissionLevelUpdate(PlayerSession player, ubyte permissionLevel)
Undocumented in source. Be warned that the author may not have intended to support it.
sendViewDistanceUpdate
void sendViewDistanceUpdate(PlayerSession player, uint viewDistance)
Undocumented in source. Be warned that the author may not have intended to support it.
sendLanguageUpdate
void sendLanguageUpdate(PlayerSession player, string language)
Undocumented in source. Be warned that the author may not have intended to support it.
sendLatencyUpdate
void sendLatencyUpdate(PlayerSession player)

Updates a player's latency (usually sent every 30 seconds).

sendPacketLossUpdate
void sendPacketLossUpdate(PlayerSession player)

Updates a player's packet loss (usually sent every 30 seconds).

onClosed
void onClosed(bool transfer)

Called when the client closes the connection. Tries to transfer every connected player to the main node.

toString
string toString()
Undocumented in source.

Meta