Expand description
Sending over the network. To a player (server side) always; to the
server (client side) only when the mod says so in yog.toml:
[network]
to_server = trueThen it needs Yog on the server, and yog build builds it with this
crate’s to-server feature. A mod that sends without saying so doesn’t
compile: the channel it names isn’t a ServerChannel.
ⓘ
// Without `to-server`: "this mod sends to the server without saying so".
yog_api::net::send_to_server("mymod:hello", vec![1u8]);Structs§
- Send
ToPlayer - Sends
payloadonchanneltoplayer(server side).
Traits§
- Server
Channel - A channel the mod sends to the server on: any name, once the mod says
it sends there (
[network] to_server = true, theto-serverfeature).
Functions§
- send_
to_ player - Sends
payloadonchanneltoplayer(server side). - send_
to_ server - Sends
payloadonchannelto the server (client side): whether it went (a server without Yog has no channel to take it).