component fathom.socket.broadcast
This component provides functions for sending and
receiving broadcast messages using UDP over IPv4.
Methods
Methods | Returns | Description |
---|---|---|
closeSocket(
callback
)
|
void
static
|
↑
This function closes a broadcast socket.
Parameters:
|
openReceiveSocket(
callback, port
)
|
void
static
|
↑
This function opens a broadcast socket and binds
it to the given port.
Parameters:
|
openSendSocket(
callback
)
|
void
static
|
↑
This function opens a socket suitable for
transmitting broadcast messages.
Parameters:
|
receive(
callback, socketid
)
|
void
static
|
↑
On a socket created via openReceiveSocket(),
this function receives data.
Parameters:
|
send(
callback, socketid, msg, ip, port
)
|
void
static
|
↑
This function transmits data on a broadcast socket.
This function should report the number of bytes successfully transmitted to the callback.
Parameters:
|