[network] fixes

This commit is contained in:
2020-03-28 17:18:12 +03:00
parent cfb9ddc8f8
commit 4bb2cd5be8
3 changed files with 3 additions and 3 deletions

View File

@@ -28,7 +28,7 @@ import ru.m.puzzlez.proto.pack.Response;
user = new UserProto().setName('Anonimus #${UUID.generateRandom(new Random()).toString().split("-").shift()}'); user = new UserProto().setName('Anonimus #${UUID.generateRandom(new Random()).toString().split("-").shift()}');
storage.write(USER_KEY, user); storage.write(USER_KEY, user);
} }
connection = ConnectionFactory.buildClientConnection("127.0.0.1", 6000, Response); connection = ConnectionFactory.buildClientConnection("127.0.0.1", 5000, Response);
connection.handler.connect(onConnectionChange); connection.handler.connect(onConnectionChange);
connection.receiveHandler.connect(onReceivePacket); connection.receiveHandler.connect(onReceivePacket);
connection.connect(); connection.connect();

View File

@@ -62,7 +62,7 @@ import ru.m.update.Updater;
updateButton.visible = true; updateButton.visible = true;
updateButton.text = 'Update ${info.version}'; updateButton.text = 'Update ${info.version}';
} }
}); }).catchError(error -> L.w('Update', 'failed: ${error}'));
} }
private function sourceViewFactory(index:Int, source:ImageListSource):ButtonView { private function sourceViewFactory(index:Int, source:ImageListSource):ButtonView {

View File

@@ -41,7 +41,7 @@ class PuzzlezServer extends ThreadServer<GameSession, Message> {
L.d(TAG, 'Running'); L.d(TAG, 'Running');
L.i(TAG, 'Build: ${CompilationOption.get("build")}'); L.i(TAG, 'Build: ${CompilationOption.get("build")}');
var host:String = Sys.args().length > 0 ? Sys.args()[0] : "0.0.0.0"; var host:String = Sys.args().length > 0 ? Sys.args()[0] : "0.0.0.0";
var port:Int = Sys.args().length > 1 ? Std.parseInt(Sys.args()[1]) : 6000; var port:Int = Sys.args().length > 1 ? Std.parseInt(Sys.args()[1]) : 5000;
var wserver = new PuzzlezServer(); var wserver = new PuzzlezServer();
L.i(TAG, 'Start on ${host}:${port}'); L.i(TAG, 'Start on ${host}:${port}');
wserver.run(host, port); wserver.run(host, port);