Basic server
Closed this issue · 1 comments
tbobm commented
Implement a basic socket server.
TODO
- Accept connections
- Receive connections
- Close connections
- Caused by client
- Timeout from server - Implies a last sent message (cf: broken pipe for
ssh
)
- Receive messages
- Send messages
Message reception shall be displayed to stdout, at least for the coding phase.
Everything should be memory-leak-free.
I'll try to work on some python-based unittest in order to manage the server ability and capacities.
The listening port(s) should be configurable, based on either arguments or configuration file.
Same goes for the IP address we listen to.
Usage
#include "logger.h"
server *create_server(char *name, char *ip, int port, logger *logger);
int run_server(); /* return code should be OK/KO */
# Something along those lines would be great I guess.
Documentation can be found at zeromq.org
DerouckClovis commented
This is better :
The listening port(s) are configurable, based on arguments and default values ( see #5 ).
Usage :
#include "logger.h"
int start_server(ARGS* arguments); /* return code should be 0 (OK) / -1 (KO) */