readme: add information section
[nit.git] / src / nitdbg_client.nit
index 2355c5e..7d4fb2f 100644 (file)
@@ -25,7 +25,7 @@ import toolcontext
 redef class ToolContext
 
        var opt_host_address: OptionString = new OptionString("Sets the host to debug from, use IPV4 only (Defaults to 127.0.0.1)", "--host")
-       var opt_debug_port: OptionInt = new OptionInt("Sets the debug port (Defaults to 22125) - Must be contained between 0 and 65535", 22125, "--port")
+       var opt_debug_port: OptionInt = new OptionInt("Sets the debug port (Defaults to 22125)", 22125, "--port")
 
        redef init
        do
@@ -65,19 +65,19 @@ if toolcontext.opt_debug_port.value < 0 or toolcontext.opt_debug_port.value > 65
        return
 end
 
-var debug: Socket
+var debug: TCPStream
 
 # An IPV4 address does always complies to this form : x.x.x.x
 # Where x is an integer whose value is >=0 and <= 255
 if toolcontext.opt_host_address.value != null then
        if toolcontext.opt_host_address.value.is_valid_ipv4_address then
-               debug = new Socket.client(toolcontext.opt_host_address.value.as(not null), toolcontext.opt_debug_port.value)
+               debug = new TCPStream.connect(toolcontext.opt_host_address.value.as(not null), toolcontext.opt_debug_port.value)
        else
                toolcontext.option_context.usage
                return
        end
 else
-       debug = new Socket.client("127.0.0.1", toolcontext.opt_debug_port.value)
+       debug = new TCPStream.connect("127.0.0.1", toolcontext.opt_debug_port.value)
 end
 
 print "[HOST ADDRESS] : {debug.address}"