Php is used for packet forwarding. you can find ideas and code ~~!!! Now there is A need to use php for data packet forwarding. Specific Requirements: listen to A local port (both A and B communicate through this port ), forward the data packet to be sent by A to B and the data packet to be sent by B to. In this case, php is used to implement a program similar to a transfer station. do you have any good ideas or code ~ Thank you !! ------ Solution -- use php to forward data packets. you can find ideas and code ~~!!!
There is a need to use php for data packet forwarding. specific requirements:
Listen to A local port (both A and B communicate through this port), forward the data packet sent by A to B, and forward the data packet sent by B to.
In this case, php is used to implement a program similar to a transfer station. do you have any good ideas or code ~ Thank you !!
------ Solution --------------------
You can google the php socket server, but it is a bit painful to use PHP. change Java or C/C ++.
------ Solution --------------------
Gearman can implement the functions you need... there are queues, messages, and other mechanisms .....
The socket is out of date and unstable. it is best to use curl.
------ Solution --------------------
Make two receiving files,
Receive from a post --- B $ _ post
Receive from B post --- A $ _ post
------ Solution --------------------
I learned.