diff options
author | Aki <please@ignore.pl> | 2020-04-30 11:40:58 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2020-04-30 11:40:58 +0200 |
commit | bf70b8424ff43a65d642df1474b68e9a4b9d4717 (patch) | |
tree | bcc33414b4d6db14317a13fab0e2f2e932eb32f0 | |
parent | ab0f572b4cdd4b48aa28129f703e7e6347829e8a (diff) | |
download | plop-bf70b8424ff43a65d642df1474b68e9a4b9d4717.zip plop-bf70b8424ff43a65d642df1474b68e9a4b9d4717.tar.gz plop-bf70b8424ff43a65d642df1474b68e9a4b9d4717.tar.bz2 |
Added basic docs comments
-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) |