|
-
September 6th, 2010, 09:29 AM
#1
PHP sockets theoretic question
Hey,
I have PHP file which listens to connections using sockets.
the clients are C++ applications which open the PHP file (to make it listen) and then connect.
my question is, what if 2 different applications open the PHP file? will it open 2 different PHP servers? or will it "re-open" the same server each time?
it's kinda messy question but i hope you understood.. 
Thakns!
-
September 6th, 2010, 06:02 PM
#2
Re: PHP sockets theoretic question
Sockets can only connect to one port per instance. Duplicating a socket with an open port will be blocked due to port being in use.
If the post was helpful...Rate it! Remember to use [code] or [php] tags.
-
September 7th, 2010, 09:40 AM
#3
Re: PHP sockets theoretic question
Hmm yea, you right, didn't think about it. Thanks!
-
September 20th, 2010, 10:04 AM
#4
Re: PHP sockets theoretic question
It may be possible to connect to the php script and negociate a port for further communication. For example, client connects on port 80, php file answers "7038" and with proper webserver config it may be possible to have the client connect back to this port, and continue communication here.
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
|
Click Here to Expand Forum to Full Width
|