fixed send and receive to create sockets themselves