set _socket in constructor.