ajp_base.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:Flask_Blog 作者: sugarguo 项目源码 文件源码
def processInput(self):
        """Wait for and process a single packet."""
        pkt = Packet()
        select.select([self._sock], [], [])
        pkt.read(self._sock)

        # Body chunks have no packet type code.
        if self._request is not None:
            self._processBody(pkt)
            return

        if not pkt.length:
            raise ProtocolError, 'unexpected empty packet'

        pkttype = pkt.data[0]
        if pkttype == PKTTYPE_FWD_REQ:
            self._forwardRequest(pkt)
        elif pkttype == PKTTYPE_SHUTDOWN:
            self._shutdown(pkt)
        elif pkttype == PKTTYPE_PING:
            self._ping(pkt)
        elif pkttype == PKTTYPE_CPING:
            self._cping(pkt)
        else:
            raise ProtocolError, 'unknown packet type'
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号