synapse bind method lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- epergola · 2016-08-25 20:18 HI all Can anyone help me with this? I want to have asynapse httpserver runnig on a remote site (basically a PC). What is the correct way to set the parameters for bind()? The server is running in memory on the remote PC and uses a Dynamic DNS service. Assuming it has port 80 open. Should I use bind('0.0.0.0,80) or   bind('127.0.0.1',80).? Or perhaps the use the ip corresponding to the dns name? Thanks ---------------------------------------------------------------------- epergola · 2016-08-25 21:22 Or perhaps the use the ip corresponding to the dns name? that would not make sense. I must have been half-aslee. ---------------------------------------------------------------------- User137 · 2016-08-26 01:40 Bind on 0.0.0.0 . I mean even if you do that you can (and should) still connect to it locally with 127.0.0.1. ---------------------------------------------------------------------- epergola · 2016-08-26 02:42 Sorry, what does I mean even if you do that  mean? i do what? From what you say it seems tha i should use  bind('127.0.0.1',80) and not  bind('0.0.0.0',80)? ---------------------------------------------------------------------- User137 · 2016-08-26 11:46 bind('0.0.0.0',80) and http://127.0.0.1  to connect to it. ---------------------------------------------------------------------- rvk · 2016-08-26 11:56 Quote from: epergola on August 25, 2016, 10:18:51 pmThe server is running in memory on the remote PC and uses a Dynamic DNS service. Yes... bind('0.0.0.0',80). It will bind to ALL available network interfaces. You can connect from that same machine to http://127.0.0.1 or http://localhost But when you want to connect from another PC (you said this was a remote PC) you need to know the IP address (or host-name) of the PC you're running this httpserver on. This is the internal IP address on your local network. Then connect http://x.x.x.x (where x.x.x.x is the IP) or http://hostname (where hostname is the hostname of that PC) from any PC on your local network. If you want to connect from OUTSIDE your own local network you need to do some port-forwarding. (let us know if that's the case) ---------------------------------------------------------------------- epergola · 2016-08-26 16:31 Tx user137. Hola RVK, long time!. Yes that is the case, but I think I got that covered. i.e. yes connect from outside and yes port 80 should be 'open' or forwarded on the PC that runs the http server.