succeed to remove socket related class, change to socket thread and all code is in same class