Basically what I need is an example of a server using sockets in C. The code would need to be compatible for Windows and Linux (if possible). The socket code should be in a separate class so the main program would be something like:
#include "yourclass"
void main(void)
{
socket_class first_server;
socket_class second_server;
[login to view URL](); // Creates the sockets, checks for errors
[login to view URL]();
[login to view URL](23); //Sets the 1st server port
[login to view URL](15);
first_server.other_settings(); // Sets other settings that I could've forgot
[login to view URL](); //Starts listening on this port
[login to view URL]();
return 0;
}
This would start both servers and the program would run until the user types Ctrl-C or something. The commands sent by the clients would be handled by the class using a switch...case.
ADDED Nov 13: It is important that the application's thread is not interrupted by starting the server. In the example above, the would be some more code between [login to view URL](); and return 0; that would need to run at the same time that the server will accept connections and deliver the needed messages to the clients.
That's about all I can think of for now. If you need details, don't hesitate to send me a mail.
## Deliverables
1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.
2) Installation package that will install the software (in ready-to-run condition) on the platform(s) specified in this bid request.
3) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).
## Platform
DOS, Linux (if possible)