Creating the thread for handling data traffic