Skip to content

Commit

Permalink
Update Berry.md
Browse files Browse the repository at this point in the history
udp.stop() was renamed to close()
  • Loading branch information
sfromis authored Dec 17, 2022
1 parent f3febe5 commit daaf95b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/Berry.md
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@ General Function|Parameters and details
udp()<a class="cmnd" id="udp_ctor">|`udp() -> <instance udp>`<br>Creates an instance of `udp` class.
begin<a class="cmnd" id="udp_begin">|`begin(port:int) -> bool`<BR>Create a UDP listener and sender on all interfaces for `port`.<BR>Returns `true` if successful.<BR>The previous syntax `begin(ip:string, port:int) -> bool` is deprecated and the first argument will be ignored if it's a string.
begin_multicast<a class="cmnd" id="udp_begin_mcast">|`begin(ip:string, port:int) -> bool`<BR>Create a UDP listener and sender on interface `ip` and `port`. `ip` must be a multicast address.<BR>Returns `true` if successful.
stop<a class="cmnd" id="udp_stop">|`stop() -> bil`<BR>Closes UDP lisetenr and sender, and frees resources. You can't send or receive anymore with this instance.
close<a class="cmnd" id="udp_close">|`close() -> bil`<BR>Closes UDP listener and sender, and frees resources. You can't send or receive anymore with this instance.
send<a class="cmnd" id="udp_send">|`send(addr:string, port:int, payload:bytes) -> bool`<BR>Sends a packet to address `addr`, port `port` and message as `bytes()` buffer.<BR>Returns `true` if successful.
send_multicast<a class="cmnd" id="udp_send_mcast">|`send(payload:bytes) -> bool`<BR>Sends a payload as `bytes()` buffer to the multicast address. `begin_multicast()` must have been previously called.<BR>Returns `true` if successful.
read<a class="cmnd" id="udp_read">|`read() -> bytes() or nil`<BR>Reads any received udp packet as bytes() buffer, or `nil` if no packet was received.
Expand Down

0 comments on commit daaf95b

Please sign in to comment.