send and recv data on sockets