X-Git-Url: https://gapil.gnulinux.it/gitweb/?p=gapil.git;a=blobdiff_plain;f=listati%2FTCP_echo_fifth.c;h=021b2638be21b2951ec71c1c15460bdbc85c9061;hp=d3e383c59f43e7137b919341d28e5edd812a5b5a;hb=0dbba49e4c91e077cef2599a2cc735950b61e437;hpb=b613eaf32bee556b7f2cd436fd37c89adfff8ca1 diff --git a/listati/TCP_echo_fifth.c b/listati/TCP_echo_fifth.c index d3e383c..021b263 100644 --- a/listati/TCP_echo_fifth.c +++ b/listati/TCP_echo_fifth.c @@ -8,8 +8,10 @@ int main(int argc, char *argv[]) ... /* call sockaddr to get a connected socket */ if ( (sock = sockconn(argv[optind], "echo", 6, SOCK_STREAM)) < 0) { + if (errno) perror("Socket creation error"); return 1; } + ... /* do read/write operations */ ClientEcho(stdin, sock); /* normal exit */