Skip to content
FutureBlitz

    Install

    Import std.net.game.link

    std.net.game.link

    std.net.game's links: what a GameHost sends its packets over and takes them from. A UdpSocket is one, through GameHost.Bind, and so is any Class that implements GameLink, as a test's link that loses packets on purpose does.

    std/net/game/link.fb

    Types

    Public Interface GameLink

    What a GameHost's datagrams go over, as UDP's do: each one whole or not at all, maybe more than once, in no promised order.

    std/net/game/link.fb, line 12

    • ReadOnly Property LocalAddress: SocketAddress property #

      Where it receives, as the other side sends to it.

    • Method Send(bytes: UInt8[], to: SocketAddress) Throws NetError method #

      Sends bytes to to as one datagram.

    • Method Receive(timeout: Duration): (UInt8[], SocketAddress)? Throws NetError method #

      The next datagram that's come, and where from, waiting for timeout at most, or Null when none came by then. A timeout of 0 takes what's come without waiting.

    • Async Method ReceiveAsync(timeout: Duration): (UInt8[], SocketAddress)? Throws NetError method #

      Receive's Async twin, which waits on the main thread.

    • Method Close() method #

      Closes it, if it holds anything to close.

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