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
https://forums.phpfreaks.com/topic/254592-tcpudp-connection-to-a-back-end-server/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.