Jump to content

TCP/UDP connection to a back-end server


HeartHandler

Recommended Posts

Hello everyone,

 

I am facing difficulties in designing the link between my website, written in PHP, and a back-end server, written in C++. I could use some PHP developers' opinion.

 

The back-end server must process the requests sent by the PHP website. Since the requests can take more than 10 seconds to be processed, I would like them to be executed in parallel. I assume Apache already runs the PHP scripts in parallel when several clients are simultaneously connected to the website. Am I right? Then how each PHP script can simultaneously create sockets between the two servers, giving that only one socket per port is allowed between two IP addresses? I’m aware of the SO_REUSEADDR option, but I don’t want to use it for a bad reason. Moreover, it might be the solution for sending packets, but does it really make sense to wait for UDP or TCP packets client-side, since the clients are run in parallel?

 

Thanks

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.