Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(14)  |  Call(14)  |  Derive(0)  |  Import(0)

        def DecodePacket(data):
    [isFromServer, isResponse, sequence] = DecodeHeader(data)
    wordsSize = DecodeInt32(data[4:8]) - 12
    words = DecodeWords(wordsSize, data[12:])
    return [isFromServer, isResponse, sequence, words]
        


src/b/3/b3-1.9.2/b3/parsers/frostbite/connection.py   b3(Download)
            words = command
        request = protocol.EncodeClientRequest(words)
        self.printPacket(protocol.DecodePacket(request))
        try:
            self._serverSocket.sendall(request)
        if response is None:
            return None
        decodedResponse = protocol.DecodePacket(response)
        self.printPacket(decodedResponse)
        #[isFromServer, isResponse, sequence, words] = decodedResponse
                    self.subscribeToEvents()
                [tmppacket, self._receiveBuffer] = protocol.receivePacket(self._serverSocket, self._receiveBuffer)
                [isFromServer, isResponse, sequence, words] = protocol.DecodePacket(tmppacket)
                if isFromServer and not isResponse:
                    packet = tmppacket
                    self.console.verbose2('checking connection...')
                    request = protocol.EncodeClientRequest(['eventsEnabled','true'])
                    self.printPacket(protocol.DecodePacket(request))
                    self._serverSocket.sendall(request)
                    timeout_counter = 0
            except socket.error, detail:
                raise FrostbiteNetworkException('readEvent: %r'% detail)
 
        try:
            [isFromServer, isResponse, sequence, words] = protocol.DecodePacket(packet)

src/b/i/big-brother-bot-HEAD/b3/parsers/frostbite/connection.py   big-brother-bot(Download)
            words = command
        request = protocol.EncodeClientRequest(words)
        self.printPacket(protocol.DecodePacket(request))
        try:
            self._serverSocket.sendall(request)
        if response is None:
            return None
        decodedResponse = protocol.DecodePacket(response)
        self.printPacket(decodedResponse)
        #[isFromServer, isResponse, sequence, words] = decodedResponse
                    self.subscribeToEvents()
                [tmppacket, self._receiveBuffer] = protocol.receivePacket(self._serverSocket, self._receiveBuffer)
                [isFromServer, isResponse, sequence, words] = protocol.DecodePacket(tmppacket)
                if isFromServer and not isResponse:
                    packet = tmppacket
                    self.console.verbose2('checking connection...')
                    request = protocol.EncodeClientRequest(['eventsEnabled','true'])
                    self.printPacket(protocol.DecodePacket(request))
                    self._serverSocket.sendall(request)
                    timeout_counter = 0
            except socket.error, detail:
                raise FrostbiteNetworkException('readEvent: %r'% detail)
 
        try:
            [isFromServer, isResponse, sequence, words] = protocol.DecodePacket(packet)