Apache and networking stuff....

Blitz3D Forums/Blitz3D Beginners Area/Apache and networking stuff....

Verminaard(Posted 2003) [#1]
howdy,
i know there is a networking forum, but i thought this was pretty newbie stuff, so i would stick it here :D
I use Apache (v 1.3. something) to test php based webpages on my machine, and i was wondering if it was possible to use it to test a networked BB program and run the client side and the server side on the same machine?
if so, how would i go about it? i know the ip 127.0.0.1 refers to itself (i think :/ feel free to correct me :D) so would i set both the client and the server programs to look for tcp or udp streams on that ip?

thanks
~V~


FlameDuck(Posted 2003) [#2]
so would i set both the client and the server programs to look for tcp or udp streams on that ip?
More or less. The server is running on the machine. It is "listening" (that is waiting) for a connection on whichever port you specify. The client then connects to the server on 127.0.0.1 (the loopback address, or simply localhost) on the same port. The server accepts the connection and you start sending data. Did that answer your question? I don't know what this has to do with Apache tho'.


jfk EO-11110(Posted 2003) [#3]
Correct me if I'm wrong, but I think with UDP it's a bit diffrent: when in a localhost test mode you should use diffrent Ports for Server and Client, while you could use the same Ports when Server and Client are not on the same Machine.

Basicly accessing PHP Pages running on Apache is the same as any other TCP based HTTP Request: The server is using the assigned Port, usually 80, while the Client is using some Ports above 1024, incrementing Portnumbers for additional Streams etc. As far as I see you don't have to specify the Clients TCP Port, this is done automaticly by Winsocks or something, the Client only needs to define the Server Port. But, of course, maybe I am completely wrong here :)


Verminaard(Posted 2003) [#4]
hmmmm
i am not sure to be honest..... i think ill have to have a play with it. ill let yall know how i get on :D