Socket woes

Björnke von Gierke bvg at mac.com
Sun Jul 25 06:54:48 EDT 2004


I am trying to make a chat application. For that I want to be able to 
open a socket and keep it open. this functions great on my local LAN. 
But I want it to work also from the internet. Because of that I have 
activated port forwarding on my router, and tried to contact him 
instead of the server directly. This does not function at all, but does 
not generate any errors either... So, is it a problem of liburl? The 
router? my code? I don't know, but maybe someone can help me. Details 
below:


Port I use: 1029
Router address: 192.168.1.1 respectively 81.6.14.88
Router Port redirection to 192.168.1.2 for 1029 enabled

Client and server address: 192.168.1.2

code to connect (Client):

on mouseUp
   --open socket to "192.168.1.1:1029"
   --open socket to "81.6.14.88:1029"
   --neither do work
   open socket to "192.168.1.2:1029"
   --does work!
   if the result <> "" then
     put the result
   end if
end mouseUp


code to accept (Server):

on mouseUp
   accept connections on port 1029 with message connected
   if the result <> "" then
     put the result
   end if
end mouseUp

on connected theIP
   put "connected:" && theIP
end connected

Thank you in advance.



More information about the use-livecode mailing list