Module: Pixiurge::Protocol::Incoming

Defined in:
lib/pixiurge/protocol.rb

Overview

Fixed constants for incoming protocol messages. "Incoming" in this sense means "sent from the front end to the server" rather than vice-versa.

Since:

  • 0.1.0

Defined Under Namespace

Modules: Keycode

Constant Summary

AUTH_REGISTER_ACCOUNT =

Register an account using the built-in auth protocol.

Examples:

[ AUTH_REGISTER_ACCOUNT, { "username" => username, "salt" => salt, "bcrypted" => hash } ]

Since:

  • 0.1.0

"register_account"
AUTH_LOGIN =

Log into an account using the built-in auth protocol. If used, it's the second string entry in its JSON array. Note that the bcrypted value implicitly uses the salt, which does not need to be explicitly sent to the server. BCrypt handles that part.

Examples:

[ AUTH_LOGIN, { "username" => username, "bcrypted" => hash } ]

Since:

  • 0.1.0

"hashed_login"
AUTH_GET_SALT =

Get an account's cryptographic salt for the built-in auth protocol.

Examples:

[ AUTH_GET_SALT, { "username" => username } ]

Since:

  • 0.1.0

"get_salt"
PLAYER_ACTION =

A message from player input.

Examples:

[ PLAYER_ACTION, "move", "left" ]

[ PLAYER_ACTION, "keypress", { "code" => 37 } ]

Since:

  • 0.1.0

"player_action"