Split thread class in 2 classes

One for send and another for receive things.