summaryrefslogtreecommitdiff
path: root/devdocs/elisp/datagrams.html
blob: b91be763a071a9847385b44c85feb047e150f30c (plain)
1
2
3
4
5
6
7
8
9
10
 <h3 class="section">Datagrams</h3>  <p>A <em>datagram</em> connection communicates with individual packets rather than streams of data. Each call to <code>process-send</code> sends one datagram packet (see <a href="input-to-processes">Input to Processes</a>), and each datagram received results in one call to the filter function. </p> <p>The datagram connection doesn’t have to talk with the same remote peer all the time. It has a <em>remote peer address</em> which specifies where to send datagrams to. Each time an incoming datagram is passed to the filter function, the peer address is set to the address that datagram came from; that way, if the filter function sends a datagram, it will go back to that place. You can specify the remote peer address when you create the datagram connection using the <code>:remote</code> keyword. You can change it later on by calling <code>set-process-datagram-address</code>. </p> <dl> <dt id="process-datagram-address">Function: <strong>process-datagram-address</strong> <em>process</em>
</dt> <dd><p>If <var>process</var> is a datagram connection or server, this function returns its remote peer address. </p></dd>
</dl> <dl> <dt id="set-process-datagram-address">Function: <strong>set-process-datagram-address</strong> <em>process address</em>
</dt> <dd><p>If <var>process</var> is a datagram connection or server, this function sets its remote peer address to <var>address</var>. </p></dd>
</dl><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Datagrams.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Datagrams.html</a>
  </p>
</div>