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