UDPRuntimeBackend¶
Wrappers for the runtime's pony_os_* UDP functions -- bind, recvfrom,
sendto, and socket teardown.
Implements¶
- UDPBackend ref
Constructors¶
create¶
Returns¶
- UDPRuntimeBackend ref^
Public Functions¶
bind¶
fun ref bind(
the_actor: AsioEventNotify tag,
host: String val,
port: String val,
ip_version: IPVersion = DualStack)
: AsioEventID
Parameters¶
- the_actor: AsioEventNotify tag
- host: String val
- port: String val
- ip_version: IPVersion = DualStack
Returns¶
close¶
Parameters¶
- fd: U32 val
Returns¶
- None val
recvfrom¶
Read one datagram via @pony_os_recvfrom.
fun ref recvfrom(
event: AsioEventID,
buffer: Pointer[U8 val] tag,
size: USize val)
: (SocketResult , USize val , NetAddress iso^)
Parameters¶
- event: AsioEventID
- buffer: Pointer[U8 val] tag
- size: USize val
Returns¶
- (SocketResult , USize val , NetAddress iso^)
sendto¶
Parameters¶
- fd: U32 val
- data: ByteSeq
- to: NetAddress box
Returns¶
sockname¶
Parameters¶
- fd: U32 val
- ip: NetAddress tag
Returns¶
- Bool val