Difference between revisions of "enet.host:broadcast"
m (→Arguments: carbon copied my better explanation over from peer:send for consistency's sake.) |
(Added variant added in love 12) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 11: | Line 11: | ||
=== Returns === | === Returns === | ||
− | Nothing | + | Nothing. |
+ | |||
+ | == Function == | ||
+ | {{newin|[[12.0]]|120|type=variant}} | ||
+ | === Synopsis === | ||
+ | <source lang="lua"> | ||
+ | host:send(pointer, size, channel, flag) | ||
+ | </source> | ||
+ | === Arguments === | ||
+ | {{param|light userdata|pointer|The data of the packet to send to all clients.}} | ||
+ | {{param|number|size|The size of the memory starting at the pointer.}} | ||
+ | {{param|number|channel|The channel to send the packet on. Optional. Defaults to 0.}} | ||
+ | {{param|string|flag|flag is one of "reliable", "unsequenced", or "unreliable". Reliable packets are guaranteed to arrive, and arrive in the order in which they are sent. Unreliable packets arrive in the order in which they are sent, but they aren't guaranteed to arrive. Unsequenced packets are neither guaranteed to arrive, nor do they have any guarantee on the order they arrive. Optional. Defaults to reliable.}} | ||
+ | === Returns === | ||
+ | Nothing. | ||
== See Also == | == See Also == | ||
* [[parent::lua-enet]] | * [[parent::lua-enet]] | ||
* [[enet.peer]] | * [[enet.peer]] | ||
+ | * [[enet.peer:send]] | ||
== Other Languages == | == Other Languages == | ||
− | {{i18n|enet.host: | + | {{i18n|enet.host:broadcast}} |
Latest revision as of 17:57, 9 May 2023
Queues a packet to be sent to all connected peers.
Contents
Function
Synopsis
host:broadcast(data, channel, flag)
Arguments
string data
- The data to send.
number channel
- The channel to send the packet on. Defaults to 0.
string flag
- flag is one of "reliable", "unsequenced", or "unreliable". Reliable packets are guaranteed to arrive, and arrive in the order in which they are sent. Unreliable packets arrive in the order in which they are sent, but they aren't guaranteed to arrive. Unsequenced packets are neither guaranteed to arrive, nor do they have any guarantee on the order they arrive. Optional. Defaults to reliable.
Returns
Nothing.
Function
Available since LÖVE 12.0 |
This variant is not supported in earlier versions. |
Synopsis
host:send(pointer, size, channel, flag)
Arguments
light userdata pointer
- The data of the packet to send to all clients.
number size
- The size of the memory starting at the pointer.
number channel
- The channel to send the packet on. Optional. Defaults to 0.
string flag
- flag is one of "reliable", "unsequenced", or "unreliable". Reliable packets are guaranteed to arrive, and arrive in the order in which they are sent. Unreliable packets arrive in the order in which they are sent, but they aren't guaranteed to arrive. Unsequenced packets are neither guaranteed to arrive, nor do they have any guarantee on the order they arrive. Optional. Defaults to reliable.
Returns
Nothing.
See Also
Other Languages
Dansk –
Deutsch –
English –
Español –
Français –
Indonesia –
Italiano –
Lietuviškai –
Magyar –
Nederlands –
Polski –
Português –
Română –
Slovenský –
Suomi –
Svenska –
Türkçe –
Česky –
Ελληνικά –
Български –
Русский –
Српски –
Українська –
עברית –
ไทย –
日本語 –
正體中文 –
简体中文 –
Tiếng Việt –
한국어
More info