Simple TCP server service for CentOS 5 that runs command line from packet received and send packet to connected clients from a command line.
Deadline 3 days.
## Deliverables
I want a TCP server that accepts a large number of simultaneous connections from a single port. It must be compiling with g++, gcc, cpp or c++ in CentOS 5 and run in the background as a service.
You must provide me the instructions to install the program.
Each connection/session must have its unique identifier. That identifier can be a number, or number and letters, but cannot contain any other characters than digits and letters.
When a client connects to the server, a new identifier is assigned to it. If the client sends any packet to the server, then the server will run a shell command (I will provide you with the command line) that does NOT block the process. This is for real-time application to send short messages as instantly as possible so it starts the program without waiting for the process to end and disregard it's output. Then if the command takes 3 seconds to be executed, this service doesn't become unavailable during that time.
When the client disconnect, its identifier cannot be reused until the service is stopped and restarted.
I then need a way to request fairly small packets to all or specific connected clients. This will be done by executing a command line (provided by you). The first arguments will be session identifiers separated by a hyphen "-", and the following arguments are the data to be sent in one packet to client(s) specified in the first argument.
If a request is made for sending a packet to a client that is no longer connected, it may just be discarded.
For sending a packet to all connected clients, you may have a separate command that will send all arguments to all connected clients, or have a wildcard identifier to indicate that a packet must be sent to all clients.
Deadline 3 days.