コード例 #1
0
ファイル: bancho.py プロジェクト: kholtastrophe/gulag
async def ping(p: Player, pr: BanchoPacketReader) -> None:
    # TODO: this should be last packet time, not just
    # ping.. this handler shouldn't even exist lol
    p.ping_time = int(time.time())

    # osu! seems to error when i send nothing back,
    # so perhaps the official bancho implementation
    # expects something like a stats update.. i'm
    # just gonna ping it back, as i don't really
    # want to something more expensive so often lol
    p.enqueue(b'\x04\x00\x00\x00\x00\x00\x00')
コード例 #2
0
async def ping(p: Player, pr: PacketReader) -> None:
    p.ping_time = int(time.time())