Skip to main content

Module rtc

Module rtc 

Source
Expand description

WebRTC data channels to other players, browsers included (manifest permission rtc). The game carries the SDP strings itself (non-trickle: candidates are inside them). Each connection has one reliable, ordered channel.

Enums§

Event

Functions§

accept_answer
accept_offer
available
Whether this game may link to other players (the manifest asked for rtc and it was granted).
close
decode
offer
Starts an offer; 0 if no more connections are allowed.
poll
The next event, if any.
send
Queues a message (at most 256 KiB); false if peer is not a connection of ours.
set_ice
The world’s STUN and TURN servers (its /ice answer), before the first connection; true if taken.