Figure:
Code: Select all
Client -----1----> Socket Server -----2----> Service Provider Server
Client <----4----- Socket Server <----3----- Service Provider Server
Socket Server <----3a---- Service Provider Server
Socket Server -----3b---> Service Provider Serverand the second handle request from service provider server (3a and 3b).
The service provider allowed only one connection session from socket server to the service provider. With that policy, what i have with 2 socket service do not meet their criterion..
If i combined 2 socket server to 1 socket server, i have problem to handle the request from client and request from service provider. The problem are how to handle the respon and request from service provider.
I accepted the request from client using socket_select and socket_read, after that i reroute the request to service provider server using socket_write and wait respon from server using socket_read. If the respon arrived, i forward it to the client using socket_write.
With that flow of process, i don't know how to receive and respon the request from service provider server.
Desperately needed help for my problem above..
Thanks in advance...
ps. Sorry for my Terrible English