From 84d7a57aac3449ab5303134572c58baa9c19a034 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Sun, 28 May 2017 15:49:45 -0400 Subject: [PATCH] gamnit: tweak network doc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/tinks/src/client/base.nit | 2 +- lib/gamnit/network/common.nit | 5 ++++- lib/gamnit/network/server.nit | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/contrib/tinks/src/client/base.nit b/contrib/tinks/src/client/base.nit index b3ebd09..29f40c3 100644 --- a/contrib/tinks/src/client/base.nit +++ b/contrib/tinks/src/client/base.nit @@ -48,7 +48,7 @@ redef class App # No command line return new LocalServerContext else - print "Connecting to:{address}:{port}" + print "Connecting to {address}:{port}" # Args are: tinks server_address {port} if args.length > 1 then port = args[1].to_i diff --git a/lib/gamnit/network/common.nit b/lib/gamnit/network/common.nit index f534f1f..579145b 100644 --- a/lib/gamnit/network/common.nit +++ b/lib/gamnit/network/common.nit @@ -22,8 +22,9 @@ import binary::serialization # # This name must be the same between client/server and # it should not be used by other programs that may interfere. -# # Both client and server refuse connections with a different name. +# +# This value must not contain spaces. fun handshake_app_name: String do return program_name # Version of the communication protocol to use in the handshake @@ -32,6 +33,8 @@ fun handshake_app_name: String do return program_name # that different versions indicates incompatible protocols. # # Both client and server refuse connections with a different version. +# +# This value must not contain spaces. fun handshake_app_version: String do return "0.0" # Server port listening for discovery requests diff --git a/lib/gamnit/network/server.nit b/lib/gamnit/network/server.nit index 926e620..9e2e1f3 100644 --- a/lib/gamnit/network/server.nit +++ b/lib/gamnit/network/server.nit @@ -39,7 +39,7 @@ # # # `accept_clients` in non-blocking, # # sleep before tying again, or do something else. -# nanosleep(0, 50000000) +# 0.5.sleep # printn "." # end # ~~~ @@ -168,7 +168,7 @@ class RemoteClient # Check for compatibility with the client fun handshake: Bool do - print "Server: Handshake requested by {socket.address}" + print "Server: Handshake initiated by {socket.address}" # Make sure it is the same app var server_app = sys.handshake_app_name -- 1.7.9.5