This file is indexed.

/usr/share/doc/racket/reference/udp.html is in racket-doc 6.7-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>15.3.2&nbsp;UDP</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="os.html" class="tocviewselflink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9658;</a></td><td>15&nbsp;</td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr></table><div class="tocviewsublist" style="display: none;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">15.1&nbsp;</td><td><a href="pathutils.html" class="tocviewlink" data-pltdoc="x">Paths</a></td></tr><tr><td align="right">15.2&nbsp;</td><td><a href="Filesystem.html" class="tocviewlink" data-pltdoc="x">Filesystem</a></td></tr><tr><td align="right">15.3&nbsp;</td><td><a href="networking.html" class="tocviewselflink" data-pltdoc="x">Networking</a></td></tr><tr><td align="right">15.4&nbsp;</td><td><a href="subprocess.html" class="tocviewlink" data-pltdoc="x">Processes</a></td></tr><tr><td align="right">15.5&nbsp;</td><td><a href="logging.html" class="tocviewlink" data-pltdoc="x">Logging</a></td></tr><tr><td align="right">15.6&nbsp;</td><td><a href="time.html" class="tocviewlink" data-pltdoc="x">Time</a></td></tr><tr><td align="right">15.7&nbsp;</td><td><a href="envvars.html" class="tocviewlink" data-pltdoc="x">Environment Variables</a></td></tr><tr><td align="right">15.8&nbsp;</td><td><a href="runtime.html" class="tocviewlink" data-pltdoc="x">Environment and Runtime Information</a></td></tr><tr><td align="right">15.9&nbsp;</td><td><a href="Command-Line_Parsing.html" class="tocviewlink" data-pltdoc="x">Command-<wbr></wbr>Line Parsing</a></td></tr><tr><td align="right">15.10&nbsp;</td><td><a href="os-lib.html" class="tocviewlink" data-pltdoc="x">Additional Operating System Functions</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_2&quot;);">&#9660;</a></td><td>15.3&nbsp;</td><td><a href="networking.html" class="tocviewlink" data-pltdoc="x">Networking</a></td></tr></table><div class="tocviewsublistbottom" style="display: block;" id="tocview_2"><table cellspacing="0" cellpadding="0"><tr><td align="right">15.3.1&nbsp;</td><td><a href="tcp.html" class="tocviewlink" data-pltdoc="x">TCP</a></td></tr><tr><td align="right">15.3.2&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">UDP</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-open-socket%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>open-<wbr></wbr>socket</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-bind%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>bind!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-connect%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>connect!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send-<wbr></wbr>to</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%2A%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send-<wbr></wbr>to*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%2A%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%2Fenable-break%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send-<wbr></wbr>to/<span class="mywbr"> &nbsp;</span>enable-<wbr></wbr>break</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%2Fenable-break%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send/<span class="mywbr"> &nbsp;</span>enable-<wbr></wbr>break</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>receive!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%2A%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>receive!*</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%2Fenable-break%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>receive!/<span class="mywbr"> &nbsp;</span>enable-<wbr></wbr>break</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-close%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>close</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-bound~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>bound?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-connected~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>connected?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-ready-evt%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send-<wbr></wbr>ready-<wbr></wbr>evt</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive-ready-evt%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>receive-<wbr></wbr>ready-<wbr></wbr>evt</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to-evt%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send-<wbr></wbr>to-<wbr></wbr>evt</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-evt%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>send-<wbr></wbr>evt</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21-evt%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>receive!-<wbr></wbr>evt</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-addresses%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>addresses</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-join-group%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>join-<wbr></wbr>group!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-leave-group%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>leave-<wbr></wbr>group!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-interface%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>interface</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-set-interface%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>set-<wbr></wbr>interface!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-set-loopback%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>set-<wbr></wbr>loopback!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-loopback~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>loopback?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-set-ttl%21%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>set-<wbr></wbr>ttl!</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-ttl%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">udp-<wbr></wbr>multicast-<wbr></wbr>ttl</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="tcp.html" title="backward to &quot;15.3.1 TCP&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="networking.html" title="up to &quot;15.3 Networking&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="subprocess.html" title="forward to &quot;15.4 Processes&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h5 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-source-pkg="racket-doc" x-part-tag="&quot;udp&quot;">15.3.2<tt>&nbsp;</tt><a name="(part._udp)"></a><a name="(mod-path._racket/udp)"></a>UDP</h5><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/udp</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/udp</span></a> and <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a> libraries, but not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a>.</div></p><p>For information about UDP in general, see <span style="font-style: italic">TCP/IP Illustrated,
Volume 1</span> by W. Richard Stevens.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-open-socket))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-open-socket%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-open-socket</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">family-hostname</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">family-port-no</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">family-hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">family-port-no</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Creates and returns a <a name="(tech._udp._socket)"></a><span style="font-style: italic">UDP socket</span> to send and receive
datagrams (broadcasting is allowed). Initially, the socket is not
bound or connected to any address or port.</div></p><p>If <span class="RktVar">family-hostname</span> or <span class="RktVar">family-port-no</span> is not
<span class="RktVal">#f</span>, then the socket&rsquo;s protocol family is determined from
these arguments. The socket is <span style="font-style: italic">not</span> bound to the hostname
or port number. For example, the arguments might be the hostname
and port to which messages will be sent through the socket, which
ensures that the socket&rsquo;s protocol family is consistent with the
destination. Alternately, the arguments might be the same as for
a future call to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-bind%21%29%29" class="RktValLink" data-pltdoc="x">udp-bind!</a></span>, which ensures that the
socket&rsquo;s protocol family is consistent with the binding. If
neither <span class="RktVar">family-hostname</span> nor <span class="RktVar">family-port-no</span> is
non-<span class="RktVal">#f</span>, then the socket&rsquo;s protocol family is IPv4.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-bind!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-bind%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-bind!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname-string</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">reuse?</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname-string</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port-no</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._listen-port-number~3f%29%29" class="RktValLink" data-pltdoc="x">listen-port-number?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">reuse?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Binds an unbound <span class="RktVar">udp-socket</span> to the local port number
<span class="RktVar">port-no</span>.  If <span class="RktVar">port-no</span> is 0 the <span class="RktVar">udp-socket</span> is
bound to an ephemeral port, which can be determined by calling
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-addresses%29%29" class="RktValLink" data-pltdoc="x">udp-addresses</a></span>.</div></p><p>If <span class="RktVar">hostname-string</span> is <span class="RktVal">#f</span>, then the socket
accepts connections to all of the listening machine&rsquo;s IP
addresses at <span class="RktVar">port-no</span>. Otherwise, the socket accepts
connections only at the IP address associated with the given
name. For example, providing <span class="RktVal">"127.0.0.1"</span> as
<span class="RktVar">hostname-string</span> typically creates a listener that
accepts only connections to <span class="RktVal">"127.0.0.1"</span> from the local
machine.</p><p>A socket cannot receive datagrams until it is bound to a local address
and port. If a socket is not bound before it is used with a sending
procedure <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%29%29" class="RktValLink" data-pltdoc="x">udp-send</a></span>, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span>, etc., the sending
procedure binds the socket to a random local port. Similarly, if an
event from <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-evt%29%29" class="RktValLink" data-pltdoc="x">udp-send-evt</a></span> or <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to-evt%29%29" class="RktValLink" data-pltdoc="x">udp-send-to-evt</a></span> is chosen
for a synchronization (see <a href="sync.html" data-pltdoc="x">Events</a>), the socket is bound; if
the event is not chosen, the socket may or may not become bound.</p><p>The binding of a bound socket cannot be changed, with one exception:
on some systems, if the socket is bound automatically when sending, if
the socket is disconnected via <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-connect%21%29%29" class="RktValLink" data-pltdoc="x">udp-connect!</a></span>, and if the
socket is later used again in a send, then the later send may change
the socket&rsquo;s automatic binding.</p><p>If <span class="RktVar">udp-socket</span> is already bound or closed, the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span> exception is raised.</p><p>If the <span class="RktVar">reuse?</span> argument is true, then <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-bind%21%29%29" class="RktValLink" data-pltdoc="x">udp-bind!</a></span> will
set the <span class="stt">SO_REUSEADDR</span> socket option before binding, permitting the
sharing of access to a UDP port between many processes on a single
machine when using UDP multicast.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-connect!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-connect%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-connect!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname-string</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">port-no</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname-string</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port-no</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Connects the socket to the indicated remote address and port if
<span class="RktVar">hostname-string</span> is a string and <span class="RktVar">port-no</span> is an exact
integer.</div></p><p>If <span class="RktVar">hostname-string</span> is <span class="RktVal">#f</span>, then <span class="RktVar">port-no</span> also
must be <span class="RktVal">#f</span>, and the port is disconnected (if connected). If
one of <span class="RktVar">hostname-string</span> or <span class="RktVar">port-no</span> is <span class="RktVal">#f</span> and
the other is not, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</p><p>A connected socket can be used with <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%29%29" class="RktValLink" data-pltdoc="x">udp-send</a></span> (not
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span>), and it accepts datagrams only from the
connected address and port. A socket need not be connected to receive
datagrams.  A socket can be connected, re-connected, and disconnected
any number of times.</p><p>If <span class="RktVar">udp-socket</span> is closed, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span> exception is raised.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send-to))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send-to</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port-no</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Sends <span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._subbytes%29%29" class="RktValLink" data-pltdoc="x">subbytes</a></span><span class="stt"> </span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="stt"> </span><span class="RktVar">start-pos</span><span class="stt"> </span><span class="RktVar">end-pos</span><span class="RktPn">)</span> as a datagram from
the unconnected <span class="RktVar">udp-socket</span> to the socket at the remote
machine <span class="RktSym">hostname-address</span> on the port <span class="RktVar">port-no</span>. The
<span class="RktVar">udp-socket</span> need not be bound or connected; if it is not
bound, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span> binds it to a random local port. If the
socket&rsquo;s outgoing datagram queue is too full to support the send,
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span> blocks until the datagram can be queued.</div></p><p>If <span class="RktVar">start-pos</span> is greater than the length of <span class="RktVar">bstr</span>, or
if <span class="RktVar">end-pos</span> is less than <span class="RktVar">start-pos</span> or greater than
the length of <span class="RktVar">bstr</span>, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</p><p>If <span class="RktVar">udp-socket</span> is closed or connected, the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span> exception is raised.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>[<span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span><span class="RktVar">end-pos</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span>, except that <span class="RktVar">udp-socket</span> must be
connected, and the datagram goes to the connection target.  If
<span class="RktVar">udp-socket</span> is closed or unconnected, the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span> exception is raised.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send-to*))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send-to*</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port-no</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span>, but never blocks; if the socket&rsquo;s outgoing
queue is too full to support the send, <span class="RktVal">#f</span> is returned,
otherwise the datagram is queued and the result is <span class="RktVal">#t</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send*))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send*</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>[<span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span><span class="RktVar">end-pos</span>]<span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%29%29" class="RktValLink" data-pltdoc="x">udp-send</a></span>, except that (like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span>) it
never blocks and returns <span class="RktVal">#f</span> or <span class="RktVal">#t</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send-to/enable-break))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%2Fenable-break%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send-to/enable-break</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port-no</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span>, but breaking is enabled (see
<a href="breakhandler.html" data-pltdoc="x">Breaks</a>) while trying to send the datagram. If
breaking is disabled when <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%2Fenable-break%29%29" class="RktValLink" data-pltdoc="x">udp-send-to/enable-break</a></span> is called,
then either the datagram is sent or the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">exn:break</a></span> exception
is raised, but not both.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send/enable-break))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%2Fenable-break%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send/enable-break</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void%29%29" class="RktValLink" data-pltdoc="x">void</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%29%29" class="RktValLink" data-pltdoc="x">udp-send</a></span>, except that breaks are enabled like
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%2Fenable-break%29%29" class="RktValLink" data-pltdoc="x">udp-send-to/enable-break</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-receive!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-receive!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span></td></tr></table></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._not%29%29" class="RktValLink" data-pltdoc="x">not</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Accepts up to <span class="RktVar">end-pos</span><span style="font-style: italic">-</span><span class="RktVar">start-pos</span> bytes of
<span class="RktVar">udp-socket</span>&rsquo;s next incoming datagram into <span class="RktVar">bstr</span>,
writing the datagram bytes starting at position <span class="RktVar">start-pos</span>
within <span class="RktVar">bstr</span>. The <span class="RktVar">udp-socket</span> must be bound to a local
address and port (but need not be connected). If no incoming datagram
is immediately available, <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="RktValLink" data-pltdoc="x">udp-receive!</a></span> blocks until one is
available.</div></p><p>Three values are returned: the number of received bytes (between
<span class="RktVal">0</span> and <span class="RktVar">end-pos</span><span style="font-style: italic">-</span><span class="RktVar">start-pos</span>, a hostname
string indicating the source address of the datagram, and an integer
indicating the source port of the datagram. If the received datagram
is longer than <span class="RktVar">end-pos</span><span style="font-style: italic">-</span><span class="RktVar">start-pos</span> bytes, the
remainder is discarded.</p><p>If <span class="RktVar">start-pos</span> is greater than the length of <span class="RktVar">bstr</span>, or
if <span class="RktVar">end-pos</span> is less than <span class="RktVar">start-pos</span> or greater than
the length of <span class="RktVar">bstr</span>, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-receive!*))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%2A%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-receive!*</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._not%29%29" class="RktValLink" data-pltdoc="x">not</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="RktValLink" data-pltdoc="x">udp-receive!</a></span>, except that it never blocks. If no
datagram is available, the three result values are all <span class="RktVal">#f</span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-receive!/enable-break))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%2Fenable-break%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-receive!/enable-break</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr></table></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0"><tr><td><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span></td></tr><tr><td><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._not%29%29" class="RktValLink" data-pltdoc="x">not</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="RktValLink" data-pltdoc="x">udp-receive!</a></span>, but breaking is enabled (see
<a href="breakhandler.html" data-pltdoc="x">Breaks</a>) while trying to receive the datagram. If
breaking is disabled when <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%2Fenable-break%29%29" class="RktValLink" data-pltdoc="x">udp-receive!/enable-break</a></span> is
called, then either a datagram is received or the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3abreak%29%29" class="RktValLink" data-pltdoc="x">exn:break</a></span>
exception is raised, but not both.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-close))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-close%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-close</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Closes <span class="RktVar">udp-socket</span>, discarding unreceived datagrams.  If the
socket is already closed, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span> exception is raised.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp~3f))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> is a socket created by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-open-socket%29%29" class="RktValLink" data-pltdoc="x">udp-open-socket</a></span>, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-bound~3f))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-bound~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-bound?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">udp-socket</span> is bound to a local address
and port, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-connected~3f))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-connected~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-connected?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">udp-socket</span> is connected to a remote
address and port, <span class="RktVal">#f</span> otherwise.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send-ready-evt))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-ready-evt%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send-ready-evt</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="sync.html#%28def._%28%28quote._~23~25kernel%29._evt~3f%29%29" class="RktValLink" data-pltdoc="x">evt?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a> (see <a href="sync.html" data-pltdoc="x">Events</a>) that is
in a blocking state when <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span> on <span class="RktVar">udp-socket</span>
would block. The <a href="sync.html#%28tech._synchronization._result%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronization result</span></a> is the event itself.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-receive-ready-evt))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive-ready-evt%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-receive-ready-evt</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="sync.html#%28def._%28%28quote._~23~25kernel%29._evt~3f%29%29" class="RktValLink" data-pltdoc="x">evt?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a> (see <a href="sync.html" data-pltdoc="x">Events</a>) that is
in a blocking state when <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="RktValLink" data-pltdoc="x">udp-receive!</a></span> on <span class="RktVar">udp-socket</span>
would block. The <a href="sync.html#%28tech._synchronization._result%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronization result</span></a> is the event itself.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send-to-evt))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to-evt%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send-to-evt</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">port-no</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="sync.html#%28def._%28%28quote._~23~25kernel%29._evt~3f%29%29" class="RktValLink" data-pltdoc="x">evt?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port-no</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._port-number~3f%29%29" class="RktValLink" data-pltdoc="x">port-number?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a>. The event is in a blocking
state when <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span> on <span class="RktVar">udp-socket</span> would
block. Otherwise, if the event is chosen in a synchronization, data is
sent as for <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span><span class="stt"> </span><span class="RktVar">udp-socket</span><span class="stt"> </span><span class="RktSym">hostname-address</span><span class="stt"> </span><span class="RktVar">port-no</span><span class="stt"> </span><span class="RktVar">bstr</span><span class="stt"> </span><span class="RktVar">start-pos</span><span class="stt"> </span><span class="RktVar">end-pos</span><span class="RktPn">)</span>, and the synchronization result is
<a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&amp;rel=void_undefined.html&amp;version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#&lt;void&gt;</span></span></a>. (No bytes are sent if the event is not chosen.)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-send-evt))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-evt%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-send-evt</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="sync.html#%28def._%28%28quote._~23~25kernel%29._evt~3f%29%29" class="RktValLink" data-pltdoc="x">evt?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a>. The event is <a href="sync.html#%28tech._ready._for._synchronization%29" class="techoutside" data-pltdoc="x"><span class="techinside">ready for synchronization</span></a>
when <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send%29%29" class="RktValLink" data-pltdoc="x">udp-send</a></span> on <span class="RktVar">udp-socket</span> would
not block. Otherwise, if the event is chosen in a synchronization, data is
sent as for <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-send-to%29%29" class="RktValLink" data-pltdoc="x">udp-send-to</a></span><span class="stt"> </span><span class="RktVar">udp-socket</span><span class="stt"> </span><span class="RktVar">bstr</span><span class="stt"> </span><span class="RktVar">start-pos</span><span class="stt"> </span><span class="RktVar">end-pos</span><span class="RktPn">)</span>,
and the <a href="sync.html#%28tech._synchronization._result%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronization result</span></a> is <a href="https://download.racket-lang.org/docs/6.7/html/local-redirect/index.html?doc=guide&amp;rel=void_undefined.html&amp;version=6.7" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#&lt;void&gt;</span></span></a>. (No bytes are sent if
the event is not chosen.) If <span class="RktVar">udp-socket</span> is closed or
unconnected, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span> exception is raised during a synchronization
attempt.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-receive!-evt))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21-evt%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-receive!-evt</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">bstr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span>[</td><td valign="top"><span class="RktVar">start-pos</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">end-pos</span>]<span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="sync.html#%28def._%28%28quote._~23~25kernel%29._evt~3f%29%29" class="RktValLink" data-pltdoc="x">evt?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">bstr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._and%2Fc%29%29" class="RktValLink" data-pltdoc="x">and/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes~3f%29%29" class="RktValLink" data-pltdoc="x">bytes?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._not%29%29" class="RktValLink" data-pltdoc="x">not</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._immutable~3f%29%29" class="RktValLink" data-pltdoc="x">immutable?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">start-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">end-pos</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="number-types.html#%28def._%28%28quote._~23~25kernel%29._exact-nonnegative-integer~3f%29%29" class="RktValLink" data-pltdoc="x">exact-nonnegative-integer?</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes-length%29%29" class="RktValLink" data-pltdoc="x">bytes-length</a></span><span class="hspace">&nbsp;</span><span class="RktVar">bstr</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a <a href="sync.html#%28tech._synchronizable._event%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronizable event</span></a>. The event is <a href="sync.html#%28tech._ready._for._synchronization%29" class="techoutside" data-pltdoc="x"><span class="techinside">ready for synchronization</span></a>
when <span class="RktSym">udp-receive</span> on <span class="RktVar">udp-socket</span> would not
block. Otherwise, if the event is chosen in a synchronization, data is
received into <span class="RktVar">bstr</span> as for <span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="RktValLink" data-pltdoc="x">udp-receive!</a></span><span class="stt"> </span><span class="RktVar">udp-socket</span><span class="stt"> </span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._bytes%29%29" class="RktValLink" data-pltdoc="x">bytes</a></span><span class="stt"> </span><span class="RktVar">start-pos</span><span class="stt"> </span><span class="RktVar">end-pos</span><span class="RktPn">)</span>, and the <a href="sync.html#%28tech._synchronization._result%29" class="techoutside" data-pltdoc="x"><span class="techinside">synchronization result</span></a> is a list of
three values, corresponding to the three results from
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-receive%21%29%29" class="RktValLink" data-pltdoc="x">udp-receive!</a></span>. (No bytes are received and the <span class="RktVar">bstr</span>
content is not modified if the event is not chosen.)</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-addresses))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-addresses%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-addresses</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-port</span><span class="hspace">&nbsp;</span>[<span class="RktVar">port-numbers?</span>]<span class="RktPn">)</span></p></blockquote></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="prototype"><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="values.html#%28def._%28%28quote._~23~25kernel%29._values%29%29" class="RktValLink" data-pltdoc="x">values</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="values.html#%28def._%28%28quote._~23~25kernel%29._values%29%29" class="RktValLink" data-pltdoc="x">values</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._listen-port-number~3f%29%29" class="RktValLink" data-pltdoc="x">listen-port-number?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="tcp.html#%28def._%28%28lib._racket%2Ftcp..rkt%29._listen-port-number~3f%29%29" class="RktValLink" data-pltdoc="x">listen-port-number?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-port</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">port-numbers?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span>=<span class="hspace">&nbsp;</span><span class="RktVal">#f</span></td></tr></table></blockquote></div><div class="SIntrapara">Returns two strings when <span class="RktVar">port-numbers?</span> is <span class="RktVal">#f</span> (the
default). The first string is the Internet address for the local
machine a viewed by the given <a href="#%28tech._udp._socket%29" class="techoutside" data-pltdoc="x"><span class="techinside">UDP socket</span></a>&rsquo;s connection. (For most
machines, the answer corresponds to the current machine&rsquo;s only
Internet address, but when a machine serves multiple addresses, the
result is connection-specific.) The second string is the Internet
address for the other end of the connection.</div></p><p>If <span class="RktVar">port-numbers?</span> is true, then four results are returned: a
string for the local machine&rsquo;s address, an exact integer between
<span class="RktVal">1</span> and <span class="RktVal">65535</span> for the local machine&rsquo;s port number
or <span class="RktVal">0</span> if the socket is unbound, a
string for the remote machine&rsquo;s address, and an exact integer between
<span class="RktVal">1</span> and <span class="RktVal">65535</span> for the remote machine&rsquo;s port number
or <span class="RktVal">0</span> if the socket is unconnected.</p><p>If the given port has been closed, the <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3anetwork%29%29" class="RktValLink" data-pltdoc="x">exn:fail:network</a></span> exception is raised.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-join-group!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-join-group%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-join-group!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">multicast-addr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">multicast-addr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-leave-group!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-leave-group%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-leave-group!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">multicast-addr</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">multicast-addr</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Adds or removes <span class="RktVar">udp-socket</span> to a named multicast group.</div></p><p>The <span class="RktVar">multicast-addr</span> argument must be a valid IPv4 multicast
IP address; for example, <span class="RktVal">"224.0.0.251"</span> is the appropriate
address for the mDNS protocol. The <span class="RktVar">hostname</span> argument selects the
interface that the socket uses to receive (not send) multicast datagrams;
if <span class="RktVar">hostname</span> is <span class="RktVal">#f</span> or <span class="RktVal">"0.0.0.0"</span>, the kernel
selects an interface automatically.</p><p>Leaving a group requires the same <span class="RktVar">multicast-addr</span> and
<span class="RktVar">hostname</span> arguments that were used to join the group.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-interface))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-interface%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-interface</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-set-interface!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-set-interface%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-set-interface!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">hostname</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">hostname</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._or%2Fc%29%29" class="RktValLink" data-pltdoc="x">or/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="strings.html#%28def._%28%28quote._~23~25kernel%29._string~3f%29%29" class="RktValLink" data-pltdoc="x">string?</a></span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="RktPn">)</span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Retrieves or sets the interface that <span class="RktVar">udp-socket</span> uses to
send (not receive) multicast datagrams. If the result or <span class="RktVar">hostname</span> is either
<span class="RktVal">#f</span> or <span class="RktVal">"0.0.0.0"</span>, the kernel automatically selects an
interface when a multicast datagram is sent.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td valign="top"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-set-loopback!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-set-loopback%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-set-loopback!</a></span></span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">udp-socket</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td></tr><tr><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktVar">loopback?</span><span class="RktPn">)</span></td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top">&rarr;</td><td valign="top"><span class="hspace">&nbsp;</span></td><td valign="top"><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">loopback?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-loopback~3f))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-loopback~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-loopback?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Loopback settings correspond to the
<a name="(idx._(gentag._320._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">IP_MULTICAST_LOOP</span> setting of the socket.</p></blockquote></blockquote></blockquote></div></p><p>Sets or checks whether <span class="RktVar">udp-socket</span> receives its own multicast
datagrams: a <span class="RktVal">#t</span> result or a true value for <span class="RktVar">loopback?</span>
indicates that self-receipt is enabled, and <span class="RktVal">#f</span> indicates that
self-receipt is disabled.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-set-ttl!))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-set-ttl%21%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-set-ttl!</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span><span class="RktVar">ttl</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">ttl</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="together"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/udp..rkt)._udp-multicast-ttl))"></a><span title="Provided from: racket/udp, racket | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp-multicast-ttl%29%29" class="RktValDef RktValLink" data-pltdoc="x">udp-multicast-ttl</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">udp-socket</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="bytestrings.html#%28def._%28%28quote._~23~25kernel%29._byte~3f%29%29" class="RktValLink" data-pltdoc="x">byte?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">udp-socket</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fudp..rkt%29._udp~3f%29%29" class="RktValLink" data-pltdoc="x">udp?</a></span></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara"><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>Time-to-live settings correspond to the
<a name="(idx._(gentag._321._(lib._scribblings/reference/reference..scrbl)))"></a><span class="stt">IP_MULTICAST_TTL</span> setting of the socket.</p></blockquote></blockquote></blockquote></div></p><p>Sets or retrieves the current time-to-live setting of
<span class="RktVar">udp-socket</span>.</p><p>The time-to-live setting should almost always be 1, and it is
important that this number is as low as possible. In fact, these
functions seldom should be used at all. See the documentation for your
platform&rsquo;s IP stack.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.7&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.7&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="tcp.html" title="backward to &quot;15.3.1 TCP&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="networking.html" title="up to &quot;15.3 Networking&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="subprocess.html" title="forward to &quot;15.4 Processes&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>