HeartHandler Posted January 8, 2012 Share Posted January 8, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/254592-tcpudp-connection-to-a-back-end-server/ Share on other sites More sharing options...
RobertP Posted January 8, 2012 Share Posted January 8, 2012 i would recommend a multi-thread design Quote Link to comment https://forums.phpfreaks.com/topic/254592-tcpudp-connection-to-a-back-end-server/#findComment-1305625 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.