X-Git-Url: https://gapil.gnulinux.it/gitweb/?a=blobdiff_plain;f=sources%2FTCP_echod_first.c;h=9cc1f8d38072e6035f09cbc7f85ba7d2c8813e76;hb=d451ac30382ae398b9a2242a4f82b3438affc8a7;hp=b1356fe3f55213daae0bf5109fa2c1fa22c47370;hpb=49ae2790472cc2ad1e54ea26d037306598f9c83b;p=gapil.git diff --git a/sources/TCP_echod_first.c b/sources/TCP_echod_first.c index b1356fe..9cc1f8d 100644 --- a/sources/TCP_echod_first.c +++ b/sources/TCP_echod_first.c @@ -20,28 +20,29 @@ * * Program echod * Elementary TCP server for echo service (port 7) + * First version * * Author: Simone Piccardi * Jun. 2001 * * Usage: echod -h give all info * - * $Id: TCP_echod_first.c,v 1.2 2003/07/27 23:41:04 piccardi Exp $ - * ****************************************************************/ /* * Include needed headers */ -#include /* predefined types */ -#include /* include unix standard library */ -#include /* IP addresses conversion utiliites */ -#include /* socket library */ -#include /* include standard I/O library */ -#include +#include /* primitive system data types */ +#include /* unix standard library */ +#include /* IP addresses conversion utilities */ +#include /* socket constants, types and functions */ +#include /* standard I/O library */ +#include /* date and time constants, types and functions */ #include /* syslog system functions */ -#include /* signal functions */ -#include /* error code */ -#include /* error strings */ +#include /* signal constants, types and functions */ +#include /* error definitions and routines */ +#include /* C strings library */ +#include /* C standard library */ + #include "Gapil.h" #define BACKLOG 10 @@ -138,6 +139,7 @@ int main(int argc, char *argv[]) /* handle echo to client */ while (1) { /* accept connection */ + len = sizeof(cli_add); if ( (conn_fd = accept(list_fd, NULL, NULL)) < 0) { PrintErr("accept error"); exit(1);