yog-event 0.8.0

Yog event system — pub/sub for game/server events.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Sending over the network: the host's actions.

use yog_data::with::Raw;
use yog_ids as ids;

actions! {
    /// Sends `payload` on `channel` to `player` (server side).
    SendToPlayer { player: String, channel: String, #[data(with = "Raw")] payload: Vec<u8> } -> bool = ids::service_net::SEND_TO_PLAYER, "YogNetActions.sendToPlayer";
    /// Sends `payload` on `channel` to the server (client side).
    SendToServer { channel: String, #[data(with = "Raw")] payload: Vec<u8> } -> bool = ids::service_net::SEND_TO_SERVER, "YogClient.sendToServer";
}