Skip to content
FutureBlitz

    Install

    Import std.net.game.host

    GameEvent

    std.net.game.host

    struct

    Public Struct GameEvent Implements Printable

    Something that happened at a GameHost's Update: a peer connected, a message came from one on a channel, or a peer disconnected, and why.

    std/net/game/host.fb, line 70

    • Public ReadOnly Field Kind: GameEventKind field #

      What happened.

    • Public ReadOnly Field Peer: GamePeer field #

      The peer it happened to.

    • Public ReadOnly Field Channel: Int field #

      The channel a RECEIVE's message came on.

    • Public ReadOnly Field Bytes: UInt8[] field #

      A RECEIVE's message.

    • Public ReadOnly Field Reason: DisconnectReason field #

      Why a DISCONNECT's peer went.

    • Public Property Text: String property #

      A message's bytes as UTF-8.

    • Public Method ToString(): String method #

      As "CONNECT 127.0.0.1:5000", "RECEIVE 127.0.0.1:5000 on 0, 5 bytes", or "DISCONNECT 127.0.0.1:5000, TIMEOUT".

    Report an issue with this page or with FutureBlitz on GitHub.