Revise the receive socket!
move the receive operation to a thread