thread for connection and other for recv
last changes