# 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
#
# 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
# 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
#
# # `accept_clients` in non-blocking,
# # sleep before tying again, or do something else.
-# nanosleep(0, 50000000)
+# 0.5.sleep
# printn "."
# end
# ~~~
# 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