overloading sendData in threadsock.h