LoginInstance, there should only be 1.
- Source:
Members
-
acceptConnections
-
A boolean variable to decide if we want to accept incoming connections.
- Source:
-
clients
-
Array of current connected clients.
- Source:
-
instance
-
A TCP server instance.
- Source:
-
listening
-
Boolean indicating that the server is running
and listening for incoming connections.- Source:
-
listeningPort
-
Used Later to see if config has to offer a new port to listen to.
If is different than currently listening, re-listen the tcp server,
to listen for the new port.- Source:
-
packetCollection
-
A object of packet collection for this current instance.
- Source:
Methods
-
init()
-
Initalizes the Login Instance.
Loads up packets, database, structures etc.- Source:
-
onConnection(socket)
-
Action taken upon connection to the Login Server.
Parameters:
Name Type Description socket
socket The client socket.
- Source:
-
onDisconnect(socket)
-
Action taken upon disconnection from the Login Server.
Parameters:
Name Type Description socket
socket The client socket.
- Source:
-
onError(err, socket)
-
Action taken upon connection to the Login Server.
Parameters:
Name Type Description err
exception An error.
socket
socket The client socket.
- Source: