Page 1 of 1

Server IP address

Posted: Sat Jan 19, 2013 4:03 pm
by KimSteff
How can I use the builtin server function if i like to deside the used IP-address
I have ude the Server/Client modules and it works just fine. BUT. If the computer already are using a network this networks IP address will allways be used by the Server module. This is a problem if your Server/Client applications are running on the same computer and you are using the network as a mean to pass data from one aplication to another !
Hope you understand the problem... :-)

Re: Server IP address

Posted: Sat Jan 19, 2013 11:05 pm
by chackl
Well - you can not get the IP direct by the Server.

I have no example here at the Moment but there is a way that works.

On IP Internet:
You'll Need a php webserver
so first let your Client after load get the ip by a php script with http-post. there are lots of examples how dis is done in php on Internet ;)

On Network:
Open a Server module with random port, save the IP string and Close the Server again. Then you have the Network IP

Then after conecting to the Server the Client Needs to send the IP through the data to the Server - and the Server hase to save it.
If you want to specify the incoming DATA to a Client you have to send allways the IP in the same data message.

Allready i see no possibility to send data Bach to one specific Client. You have to include the IP of the Client to the Server message. Then all Clients filter the IP and only the Client with same IP ececutes the Data string.

Regards