From bf70b8424ff43a65d642df1474b68e9a4b9d4717 Mon Sep 17 00:00:00 2001 From: Aki Date: Thu, 30 Apr 2020 11:40:58 +0200 Subject: Added basic docs comments --- plop.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/plop.c b/plop.c index c0f9919..eb27125 100644 --- a/plop.c +++ b/plop.c @@ -4,6 +4,12 @@ #include #include +/// 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) -- cgit v1.1