Use send() when writing to sockets, and the return type is ssize_t.
[tinc] / src / raw_socket /
drwxr-xr-x   ..
-rw-r--r-- 3408 device.c