mirror of
https://github.com/wassname/GarageServer.IO.git
synced 2026-07-09 00:20:03 +08:00
Added more logging
This commit is contained in:
@@ -147,16 +147,25 @@ window.GarageServerIO = (function (window, socketio) {
|
||||
if (_options.onPlayerConnect) {
|
||||
_options.onPlayerConnect();
|
||||
}
|
||||
if (_options.logging) {
|
||||
console.log('garageserver.io:: socket connect');
|
||||
}
|
||||
});
|
||||
_socket.on('disconnect', function () {
|
||||
if (_options.onPlayerDisconnect) {
|
||||
_options.onPlayerDisconnect();
|
||||
}
|
||||
if (_options.logging) {
|
||||
console.log('garageserver.io:: socket disconnect');
|
||||
}
|
||||
});
|
||||
_socket.on('reconnect', function () {
|
||||
if (_options.onPlayerReconnect) {
|
||||
_options.onPlayerReconnect();
|
||||
}
|
||||
if (_options.logging) {
|
||||
console.log('garageserver.io:: socket reconnect');
|
||||
}
|
||||
});
|
||||
_socket.on('update', function(data) {
|
||||
updateState(data);
|
||||
|
||||
Reference in New Issue
Block a user