    def doRequest(self):
        '''
        @brief: 将请求数据发送出去
        @return: 发送的字节数
        @rtype: int
        '''
        tarsLogger.debug('Transceiver:doRequest')
        if not self.isValid():
            return -1

        nbytes = 0
        buf = buffer(self._sendBuff)
        while True:
            if not buf:
                break
            ret = self.send(buf[nbytes:])
            if ret > 0:
                nbytes += ret
            else:
                break

        # 发送前面的字节后将后面的字节拷贝上来
        self._sendBuff = buf[nbytes:]
        return nbytes
@brief: 将请求数据发送出去
@return: 发送的字节数
@rtype: int
biliup/Danmaku/tars/__trans.py