Ejemplo n.º 1
0
    def startProtocol(self):
        self.transport.connect(self.host, self.port)

        cds = CubeDataStream()
        cds.putint(1)

        self.transport.write(str(cds))
Ejemplo n.º 2
0
def get_ext_info_reply_cds(rcds):
    cds = CubeDataStream()

    cds.write(rcds.data)

    cds.putint(EXT_ACK)
    cds.putint(EXT_VERSION)

    return cds
Ejemplo n.º 3
0
def get_ext_info_reply_cds(rcds):
    cds = CubeDataStream()

    cds.write(rcds.data)

    cds.putint(EXT_ACK)
    cds.putint(EXT_VERSION)

    return cds
Ejemplo n.º 4
0
    def info_request(self, address, millis):
        cds = CubeDataStream()
        cds.putint(millis)

        swh.put_info_reply(cds, self.room.lan_info_name,
                           self.room.player_count, self.room.maxplayers,
                           self.room.mode_num, self.room.map_name,
                           self.room.timeleft, self.room.mastermask,
                           self.room.is_paused, 100)

        self.respond(bytes(cds), address)
Ejemplo n.º 5
0
    def info_request(self, address, millis):
        cds = CubeDataStream()
        cds.putint(millis)

        swh.put_info_reply(
            cds,
            self.room.lan_info_name,
            self.room.player_count,
            self.room.maxplayers,
            self.room.mode_num,
            self.room.map_name,
            self.room.timeleft,
            self.room.mastermask,
            self.room.is_paused,
            100)

        self.respond(str(cds), address)