Vocabulary
io.sockets

Inputs
datagrama datagram socket


Outputs
bytesa byte-array
addrspecan address specifier


Word description
Waits for an incoming packet on the given datagram socket. Outputs the packet data, as well as the sender's address.

Errors
Throws an error if the packet could not be received.

Definition


:: receive ( datagram -- bytes addrspec )
datagram-size (byte-array) :> buf datagram-size buf datagram
receive-unsafe :> ( count addrspec ) count buf resize
addrspec ; inline