#include #include #include #include #include "tcpUtilities.h" #include "hello.h" main() { int sock, i; char c; sock = makeConnection( HOST_NAME, PORT_NUMBER ); i = readFromSocket( sock, &c, 1 ); while( i > 0 && c != '\0' ) { putchar( c ); i = readFromSocket( sock, &c, 1 ); } if( i < 0 ) bailOut( "Socket read failed: %s\n", sys_errlist[errno] ); close( sock ); }