implement send data to socket