
-----------------------------------
8749236
Wed May 25, 2011 6:47 pm

Really need help on Local Area Network connections..
-----------------------------------
What is it you are trying to achieve?
I'm trying to make a program that can communicate with other computer on same LAN, but i can't did it even i'm using the example program in Turing 4.1...


What is the problem you are having?
The program i wrote won't connect to the IP i want, and i'm sure that computer have a same program is running..


Describe what you have tried to solve this problem
i tried to add my computer's IP to variable "netAddress", but it still not working..


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
This is the code from Turing, it is a example program in "Network.OpenConnection", i tried many times but i don't know why it can't link to another computer..



        % The "Chat" program
        const chatPort : int := 5055
        var choice : int
        loop
            put "Enter 1 to run chat server"
            put "Enter 2 to run chat session"
            put "Choice: " ..
            get choice
            exit when choice = 1 or choice = 2
        end loop
        var netStream : int
        var netAddress : string
        
        if choice = 1 then
            netStream := Net.WaitForConnection (chatPort, netAddress)
        else
            put "Enter the address to connect to: " ..
            get netAddress
            netStream := Net.OpenConnection (netAddress, chatPort)
            if netStream 