yog_event/net.rs
1//! Sending over the network: the host's actions.
2
3use yog_data::with::Raw;
4use yog_ids as ids;
5
6actions! {
7 /// Sends `payload` on `channel` to `player` (server side).
8 SendToPlayer { player: String, channel: String, #[data(with = "Raw")] payload: Vec<u8> } -> bool = ids::service_net::SEND_TO_PLAYER, "YogNetActions.sendToPlayer";
9 /// Sends `payload` on `channel` to the server (client side).
10 SendToServer { channel: String, #[data(with = "Raw")] payload: Vec<u8> } -> bool = ids::service_net::SEND_TO_SERVER, "YogClient.sendToServer";
11}