-
client/server applications
I wondered if anyone could give me the outline how to start this kind of coding using php ?
Let say you have Comp1 and Comp2
And you have Server between them.
My goal is to get Comp1 and Comp2 know each others IP
So Comp1 connects to server
And server stores comp1's IP
In a text file or other place
And Comp2 connect to server
And server also stores his info
And then both comp1 and comp2 dowload the tex file
And use the info on it.
Please I would appreciate any supportive suggestions.
Thanks in advanced.
matt
-
I'm not sure PHP would be my first choice for doing something like this, but if that's the way you want to go, then I suppose that you would have a page that the client hits to register itself (where the server would store the IP and port info) and then another page that it would poll until the other client's information is available.
How you actually implement all this is dependent on exactly how your client works of course.
-
Do you have some web links in mind where to get some tutorials on client server applications please ?
-
I don't have a lot off the top of my head, but I know this tutorial covers a lot of the basics. It's a bit low-level (I don't actually use any of those functions directly, I use libraries that use them instead), but you'll probably need to have at least a basic understanding of most of it anyway.
Other than that, just googling client server tutorial or something would probably be your best bet. Look around until you find one that makes sense to you because all tutorials are not created equal.
-
I am talking about a direct P2P connection not a proxy session, having two seperate IPs does not facilitate a link, it facilitates a proxy. In case you really dont get my explanation.
-
Sure, but if I'm understanding you correctly you want to have a server out there somewhere that allows the two endpoints of the P2P connection to find each other. That being the case, you're going to have a bit of client/server to get the P2P connection information. And ultimately P2P is similar in many ways to client/server, it's just that both ends are both client and server at the same time, so the basic principles will still apply.
-
Yes that is what I meant. I know that I can create a page where the client will hit to get itself register (where the server will store its ip and port info). Then create another page that it would pull until other client info is available.
The server coder is what I dont really know how to start. This has got to do with STUN though.
Thanks for your response.
-
Interestingly enough, I had some problem with NAT punchthrough on one of my applications last night (turns out it was a network misconfiguration, but I didn't know that), so I just did some research on this. You might want to check out the Wikipedia page on the subject to see how it works. I'm not really familiar with STUN, but I see they have a link to it on the page so you can learn more about it.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|