1
0
Fork 0
mirror of https://github.com/dragonfireclient/hydra-dragonfire.git synced 2024-11-21 10:24:01 -05:00
hydra-dragonfire/doc/hydra.md
2022-06-01 18:09:48 +02:00

1.2 KiB

Hydra namespace

Source code: hydra.go

The hydra table contains functions necessary to handle connections.

Constants

  • hydra.BS: (= 10.0) Size of node in floating-point units. Many floating point positions contained in packets received need to be divided by this constant to obtain a position in node space. Likewise, many positions contained in packets sent need to be multiplied by this constant.
  • hydra.serialize_ver: Supported serialization version.
  • hydra.proto_ver: Supported protocol version.

Functions

  • hydra.client(address): Returns a new client. Address must be a string. For client functions, see client.md.
  • hydra.map(): Return a new map. For map functions, see map.md.
  • hydra.dtime(): Utility function that turns the elapsed time in seconds (floating point) since it was last called (or since program start).
  • hydra.poll(clients, [timeout]): Polls events from all clients in clients (table). For behavior and return value, see poll.md.
  • hydra.close(clients): Closes all clients in clients (table) that are currently connected. See client:close() in client.md for more info.