Re: TCP Client - Server : 10.10.1.15 to 10.10.1.4
You might try something that compiles first...
Hint: #include <unistd.h>, fix memset(), check return values of
socket/bind/listen/connect, and supply a readline() function.
Fix those problems and it'll work...
$ gcc -g -Wall -o server server.c
server.c:15: warning: return type of `main' is not `int'
server.c: In function `main':
server.c:25: too few arguments to function `memset'
server.c:46: warning: implicit declaration of function `fork'
server.c:48: warning: implicit declaration of function `close'
server.c:51: warning: implicit declaration of function `readline'
server.c:53: warning: implicit declaration of function `write'
$ gcc -g -Wall -o client client.c
client.c:13: warning: return type of `main' is not `int'
client.c: In function `main':
client.c:29: warning: implicit declaration of function `inet_pton'
client.c:36: warning: implicit declaration of function `write'
client.c:37: warning: implicit declaration of function `read'
--
Eric G. Miller <egm2@jps.net>
Reply to: