five-on-it / apps/client/src/renderer/rtc / RtcTransport
Interface: RtcTransport
Defined in: apps/client/src/renderer/rtc.ts:75
The WebSocket transport with a data channel beside it (see the module documentation).
Extends
Properties
lossy
readonlylossy:boolean
Defined in: apps/client/src/renderer/rtc.ts:77
Whether the unreliable frames go over the channel now (and so may be lost or reordered).
Overrides
via
readonlyvia:Via
Defined in: apps/client/src/renderer/rtc.ts:81
Which way the unreliable frames go now.
Methods
buffered()?
optionalbuffered():number
Defined in: packages/protocol/src/transport.ts:53
Bytes sent and not yet on their way (a WebSocket's buffered amount); a transport that cannot tell leaves it out.
Returns
number
Inherited from
close()
close():
void
Defined in: packages/protocol/src/transport.ts:51
Closes the connection; the close listener fires on both ends.
Returns
void
Inherited from
onClose()
onClose(
handler):void
Defined in: packages/protocol/src/transport.ts:49
Registers the single close listener.
Parameters
handler
() => void
Returns
void
Inherited from
onLossyChange()
onLossyChange(
handler):void
Defined in: apps/client/src/renderer/rtc.ts:79
Registers a listener of the changes of RtcTransport.lossy.
Parameters
handler
(lossy) => void
Returns
void
onMessage()
onMessage(
handler):void
Defined in: packages/protocol/src/transport.ts:47
Registers the single receiver of incoming frames.
Parameters
handler
(message) => void
Returns
void
Inherited from
send()
send(
channel,message):void
Defined in: packages/protocol/src/transport.ts:45
Sends one frame. unreliable frames may be dropped or reordered by a future transport; today every transport delivers both channels reliably and in order.
Parameters
channel
"reliable" | "unreliable"
message
Returns
void
Inherited from
start()
start(
welcome):void
Defined in: apps/client/src/renderer/rtc.ts:83
Starts with the welcome: offers a channel when it says the server offers one.
Parameters
welcome
rtc?
boolean
Returns
void
view()
view():
RtcView
Defined in: apps/client/src/renderer/rtc.ts:85
Where it stands, for the HUD and window.__poc.