X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=sources%2FSimpleEchoTCPServer.c;fp=sources%2FSimpleEchoTCPServer.c;h=8c0dff80698b6ff5806582a81803625625015d38;hp=35a2737cc061cecaa644c1a7dc539e2e07156943;hb=2edbeab14f348c4fa78f91e10066b74475c2353a;hpb=0e9402ecfdb1d1c387b7d53ab8dfb153a735c453 diff --git a/sources/SimpleEchoTCPServer.c b/sources/SimpleEchoTCPServer.c index 35a2737..8c0dff8 100644 --- a/sources/SimpleEchoTCPServer.c +++ b/sources/SimpleEchoTCPServer.c @@ -8,7 +8,7 @@ * * Usage: echod * - * $Id: SimpleEchoTCPServer.c,v 1.1 2001/06/10 11:47:17 piccardi Exp $ + * $Id: SimpleEchoTCPServer.c,v 1.2 2001/06/11 22:15:57 piccardi Exp $ * ****************************************************************/ /* @@ -26,11 +26,10 @@ #define BACKLOG 10 #define MAXLINE 256 -/* Subroutine declaration */ +/* Subroutines declaration */ void usage(void); void SockEcho(int sockfd); - -/* Program begining */ +/* Program beginning */ int main(int argc, char *argv[]) { /* @@ -77,7 +76,7 @@ int main(int argc, char *argv[]) /* initialize address */ memset((void *)&serv_add, 0, sizeof(serv_add)); /* clear server address */ serv_add.sin_family = AF_INET; /* address type is INET */ - serv_add.sin_port = htons(13); /* daytime port is 13 */ + serv_add.sin_port = htons(7); /* echo port is 7 */ serv_add.sin_addr.s_addr = htonl(INADDR_ANY); /* connect from anywhere */ /* bind socket */ if (bind(list_fd, (struct sockaddr *)&serv_add, sizeof(serv_add)) < 0) {