p2p_client: create dummy without threads
p2p_client: add threads
p2p_client: check if client closes the connection
use ssize_t instead of int on recv/send
add Makefile