Skip to content

Commit

Permalink
docs(general): Incorrect Manual entry note for network_send_broadcast
Browse files Browse the repository at this point in the history
#196

* Changed "TCP" -> "UDP"
* Minor other changes
  • Loading branch information
YYBartT committed Nov 20, 2024
1 parent b1f9168 commit 1fbb34d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<body>
<!--<div class="body-scroll" style="top: 150px;">-->
<h1><span data-field="title" data-format="default">network_send_broadcast</span></h1>
<p>This function broadcasts the data from a buffer locally to a range of IP addresses (for more information on buffers see <a href="../Buffers/Buffers.htm">Reference - Buffers</a>).</p>
<p>This function broadcasts the data from a buffer locally to a range of IP addresses (for more information on buffers see <a data-xref="{title}" href="../Buffers/Buffers.htm">Buffers</a>).</p>
<p>The range is limited to that of the device running the server, such that if the device has an IP of 92.168.11.130, then the data will be broadcast over the range 92.168.11.*. The function will return the number of bytes of data sent, or a number less than 0 if the send has failed.</p>
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> This function will only work when used with UDP - your server needs to be TCP and your client needs to have a UDP client socket created with <span class="inline3_func"><a data-xref="{title}" href="network_create_socket_ext.htm">network_create_socket_ext</a></span> in order to receive any broadcasts sent from the server.</p>
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> This function will only work when used with UDP - your server needs to be UDP and your client needs to have a UDP client socket created with <span class="inline3_func"><a data-xref="{title}" href="network_create_socket_ext.htm">network_create_socket_ext</a></span> in order to receive any broadcasts sent from the server.</p>
<p class="note"><span data-conref="../../../assets/snippets/Tag_note.hts"> </span> This function will not work when used in a project running on the HTML5 target.</p>
<div data-conref="../../../assets/snippets/iOS_14_IP_Multicast_Permissions.hts"> </div>
<h4>Syntax:</h4>
Expand All @@ -32,7 +32,7 @@ <h4>Syntax:</h4>
<tr>
<td>socket</td>
<td><span data-keyref="Type_ID_Network_Socket"><a href="network_create_socket.htm" target="_blank">Network Socket ID</a></span></td>
<td>The id of the socket to use.</td>
<td>The ID of the socket to use.</td>
</tr>
<tr>
<td>port</td>
Expand All @@ -57,9 +57,9 @@ <h4>Returns:</h4>
<p> </p>
<h4>Example:</h4>
<p class="code">buffer_seek(broadcast_buffer, buffer_seek_start, 0);<br />
buffer_write(broadcast_buffer, buffer_string, global.ServerName);<br />
buffer_write(broadcast_buffer, buffer_string, global.server_name);<br />
network_send_broadcast(server, 6511, broadcast_buffer, buffer_tell(broadcast_buffer));</p>
<p>The above code writes the name string of the current server (stored in <span class="inline2">global.ServerName</span>), then writes it to a buffer stored in <span class="inline2">broadcast_buffer</span>. This data is then broadcast locally to a range of IPs (the device IP is currently implied as the broadcast base range) to port 6511.</p>
<p>The above code writes the name string of the current server (stored in <span class="inline2">global.server_name</span>), then writes it to a buffer stored in <span class="inline2">broadcast_buffer</span>. This data is then broadcast locally to a range of IPs (the device IP is currently implied as the broadcast base range) to port 6511.</p>
<p> </p>
<p> </p>
<div class="footer">
Expand All @@ -69,7 +69,7 @@ <h4>Example:</h4>
<div style="float:right">Next: <a href="network_send_packet.htm">network_send_packet</a></div>
</div>
</div>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2023 All Rights Reserved</span></h5>
<h5><span data-keyref="Copyright Notice">© Copyright YoYo Games Ltd. 2024 All Rights Reserved</span></h5>
</div>
<!-- KEYWORDS
network_send_broadcast
Expand Down

0 comments on commit 1fbb34d

Please sign in to comment.