    def reInit(self):
        '''
        @brief: 初始化socket，并连接服务器
        @return: 成功返回0，失败返回-1
        @rtype: int
        '''
        tarsLogger.debug('Transceiver:reInit')
        assert(self.isValid() is False)
        if self.__epi.getConnType() != EndPointInfo.SOCK_TCP:
            return -1
        try:
            self.__sock = socket.socket()
            self.__sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
            self.__sock.setblocking(0)
            self.__sock.connect((self.__epi.getIp(), self.__epi.getPort()))
            self.__connStatus = Transceiver.CONNECTED
        except socket.error as msg:
            if msg.errno == errno.EINPROGRESS:
                self.__connStatus = Transceiver.CONNECTING
            else:
                tarsLogger.info('reInit, %s, faild!, %s',
                                self.__epi, msg)
                self.__sock = None
                return -1
        tarsLogger.info('reInit, connect: %s, fd: %d',
                        self.__epi, self.getFd())
        return 0
@brief: 初始化socket，并连接服务器
@return: 成功返回0，失败返回-1
@rtype: int
biliup/Danmaku/tars/__trans.py