Kaba class Socket ed
...
Syntax ed
class Socket
var buffer: string
var mode: Mode
var on_ready: Socket->void
var on_receive: Packet->void
var on_subscribe: bytes->void
var socket: owned[Socket]
# constructors
func mut __init__()
# functions
func mut connect(host: string, port: i32, _mode: Mode)
func mut handle_packet(p: bytes) -> i32
func mut handle_packet_command(p: bytes)
func mut iterate()
func mut send(id: bytes, payload: bytes)
func mut subscribe(id: bytes)
Functions ed
- func mut connect(host: string, port: i32, _mode: Mode)
- ...
- func mut handle_packet(p: bytes) -> i32
- ...
- func mut handle_packet_command(p: bytes)
- ...
- func mut iterate()
- ...
- func mut send(id: bytes, payload: bytes)
- ...
- func mut subscribe(id: bytes)
- ...
Elements ed
- var buffer: string
- ...
- var mode: Mode
- ...
- var on_ready: Socket->void
- ...
- var on_receive: Packet->void
- ...
- var on_subscribe: bytes->void
- ...
- var socket: owned[Socket]
- ...