On this project, i'm after somebody to create a simple php socket server that can accept connections via SSL / TLS and a sample client php socket script to connect to that php socket server using SSL / TLS.
You cannot use the stream_* functions in PHP, as we have found a number of issues which prevent it from being effective in our scenario.
So your limited to the socket_* commands and I assume you are going to have to use the openssl functions as well to actually enable the socket to speak SSL / TLS.
The socket server needs to be able to accept numerous client connections at once, up to a maximum of 5 at this stage (however I would like that value to be controlled via a Variable or Define).
Basically I need the socket server to operate as thus:
1. Socket server listens on locahost port 9002 for incoming connections.
2. The socket server then accepts the connection and SSL / TLS is activated on the link.
3. The socket server transmits a simple welcome message
4. The socket server receives any data transmitted and relays that back to the client
5. The socket server will terminate the client session when the keyword 'exit' has been sent from the client.
Sample client script:
1. Connect to localhost on port 9002
2. Establish necessary SSL / TLS communications
3. Send / Receive data from the socket server.
4. Transmit 'exit' to the server side
Any questions let me know.