diff options
Diffstat (limited to 'plop.c')
-rw-r--r-- | plop.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -4,6 +4,12 @@ #include <sys/types.h> #include <unistd.h> +/// Tries to create, bind and start listening on INET server socket. +/// \param node Hostname +/// \param service Port +/// \return File descriptor of the socket or -1 in case of an error +/// \see getaddrinfo(3) +// TODO: Handle UNIX sockets int make_server(const char * node, const char * service) { struct addrinfo hints = { @@ -50,6 +56,10 @@ int make_server(const char * node, const char * service) return server; } +/// Standard entry point for the program. +/// \param argc Argument count +/// \param argv Argument array +/// \return Error code int main(int argc, char ** argv) { if (2 != argc) |