Example: client.c
FILE “client.c” … highlights:
socket( AF_UNIX, SOCK_STREAM, 0 );
serv_adr.sun_family = AF_UNIX;
strcpy( serv_adr.sun_path, NAME );
connect(orig_sock, &serv_adr, size );
write( new_sock, buf, sizeof(buf) );
close( sd );
Note: server.c and client.c need to be linked with the libsocket.a library (ie: gcc -lsocket)