chez-libs

Hex Artifact Content
Login

Artifact 6d561fd8e88045ef64624795aaacb1d4d160494f:

Wiki page [(network nanomsg)] by murphy 2016-06-02 09:23:46.
0000: 44 20 32 30 31 36 2d 30 36 2d 30 32 54 30 39 3a  D 2016-06-02T09:
0010: 32 33 3a 34 36 2e 36 31 38 0a 4c 20 28 6e 65 74  23:46.618.L (net
0020: 77 6f 72 6b 5c 73 6e 61 6e 6f 6d 73 67 29 0a 50  work\snanomsg).P
0030: 20 62 31 62 30 38 65 33 35 64 65 63 63 39 31 32   b1b08e35decc912
0040: 31 64 61 30 38 62 35 65 66 39 65 61 37 30 65 36  1da08b5ef9ea70e6
0050: 31 34 36 30 36 36 64 38 34 0a 55 20 6d 75 72 70  146066d84.U murp
0060: 68 79 0a 57 20 33 38 39 39 0a 3c 68 31 3e 6e 61  hy.W 3899.<h1>na
0070: 6e 6f 6d 73 67 20 42 69 6e 64 69 6e 67 73 3c 2f  nomsg Bindings</
0080: 68 31 3e 0d 0a 0d 0a 3c 68 32 3e 53 79 6e 6f 70  h1>....<h2>Synop
0090: 73 69 73 3c 2f 68 32 3e 0d 0a 0d 0a 3c 63 6f 64  sis</h2>....<cod
00a0: 65 3e 28 69 6d 70 6f 72 74 20 28 6e 65 74 77 6f  e>(import (netwo
00b0: 72 6b 20 6e 61 6e 6f 6d 73 67 29 29 3c 2f 63 6f  rk nanomsg))</co
00c0: 64 65 3e 0d 0a 0d 0a 42 69 6e 64 69 6e 67 73 20  de>....Bindings 
00d0: 74 6f 20 74 68 65 20 5b 68 74 74 70 3a 2f 2f 6e  to the [http://n
00e0: 61 6e 6f 6d 73 67 2e 6f 72 67 2f 7c 6e 61 6e 6f  anomsg.org/|nano
00f0: 6d 73 67 5d 20 6e 65 74 77 6f 72 6b 20 6c 69 62  msg] network lib
0100: 72 61 72 79 2e 0d 0a 0d 0a 3c 68 32 3e 43 6f 6e  rary.....<h2>Con
0110: 64 69 74 69 6f 6e 73 3c 2f 68 32 3e 0d 0a 0d 0a  ditions</h2>....
0120: 3c 68 33 3e 63 6f 6e 64 69 74 69 6f 6e 3a 20 3c  <h3>condition: <
0130: 63 6f 64 65 3e 26 6e 61 6e 6f 6d 73 67 3c 2f 63  code>&nanomsg</c
0140: 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 3c 68 33 3e 70  ode></h3>..<h3>p
0150: 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e  rocedure: <code>
0160: 28 6e 61 6e 6f 6d 73 67 2d 63 6f 6e 64 69 74 69  (nanomsg-conditi
0170: 6f 6e 3f 20 3c 69 3e 61 6e 79 3c 2f 69 3e 29 3c  on? <i>any</i>)<
0180: 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 3c 68 33  /code></h3>..<h3
0190: 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64  >procedure: <cod
01a0: 65 3e 28 6d 61 6b 65 2d 6e 61 6e 6f 6d 73 67 2d  e>(make-nanomsg-
01b0: 63 6f 6e 64 69 74 69 6f 6e 20 3c 69 3e 6d 65 73  condition <i>mes
01c0: 73 61 67 65 3c 2f 69 3e 20 3c 69 3e 65 72 72 6e  sage</i> <i>errn
01d0: 6f 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68  o</i>)</code></h
01e0: 33 3e 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72  3>..<h3>procedur
01f0: 65 3a 20 3c 63 6f 64 65 3e 28 6e 61 6e 6f 6d 73  e: <code>(nanoms
0200: 67 2d 63 6f 6e 64 69 74 69 6f 6e 2d 65 72 72 6e  g-condition-errn
0210: 6f 20 3c 69 3e 63 6f 6e 64 69 74 69 6f 6e 3c 2f  o <i>condition</
0220: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
0230: 0a 0d 0a 54 68 65 20 3c 74 74 3e 26 6e 61 6e 6f  ...The <tt>&nano
0240: 6d 73 67 3c 2f 74 74 3e 20 63 6f 6e 64 69 74 69  msg</tt> conditi
0250: 6f 6e 20 74 79 70 65 20 69 73 20 64 65 72 69 76  on type is deriv
0260: 65 64 20 66 72 6f 6d 20 3c 74 74 3e 26 6d 65 73  ed from <tt>&mes
0270: 73 61 67 65 3c 2f 74 74 3e 20 61 6e 64 20 73 74  sage</tt> and st
0280: 6f 72 65 73 20 61 6e 20 65 72 72 6f 72 20 63 6f  ores an error co
0290: 64 65 20 74 6f 67 65 74 68 65 72 20 77 69 74 68  de together with
02a0: 20 74 68 65 20 6d 65 73 73 61 67 65 2e 0d 0a 0d   the message....
02b0: 0a 3c 68 32 3e 4f 70 65 72 61 74 69 6f 6e 73 3c  .<h2>Operations<
02c0: 2f 68 32 3e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63  /h2>....<h3>proc
02d0: 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 6e 61  edure: <code>(na
02e0: 6e 6f 6d 73 67 2d 63 6f 6e 73 74 61 6e 74 20 3c  nomsg-constant <
02f0: 69 3e 73 79 6d 62 6f 6c 3c 2f 69 3e 29 3c 2f 63  i>symbol</i>)</c
0300: 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 52 65 74  ode></h3>....Ret
0310: 72 69 65 76 65 73 20 74 68 65 20 69 6e 74 65 67  rieves the integ
0320: 65 72 20 76 61 6c 75 65 20 61 73 73 6f 63 69 61  er value associa
0330: 74 65 64 20 62 79 20 6e 61 6e 6f 6d 73 67 20 77  ted by nanomsg w
0340: 69 74 68 20 61 20 67 69 76 65 6e 20 73 79 6d 62  ith a given symb
0350: 6f 6c 2e 20 4e 61 6d 69 6e 67 20 63 6f 6e 76 65  ol. Naming conve
0360: 6e 74 69 6f 6e 20 69 73 20 6c 6f 77 65 72 20 63  ntion is lower c
0370: 61 73 65 20 77 69 74 68 20 68 79 70 68 65 6e 73  ase with hyphens
0380: 2c 20 61 73 20 75 73 75 61 6c 20 66 6f 72 20 53  , as usual for S
0390: 63 68 65 6d 65 2c 20 75 6e 6c 69 6b 65 20 74 68  cheme, unlike th
03a0: 65 20 75 70 70 65 72 20 63 61 73 65 20 77 69 74  e upper case wit
03b0: 68 20 75 6e 64 65 72 73 63 6f 72 65 73 20 63 6f  h underscores co
03c0: 6e 76 65 6e 74 69 6f 6e 20 75 73 65 64 20 69 6e  nvention used in
03d0: 20 43 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65   C.....<h3>proce
03e0: 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 73 6f 63  dure: <code>(soc
03f0: 6b 65 74 3f 20 3c 69 3e 76 3c 2f 69 3e 29 3c 2f  ket? <i>v</i>)</
0400: 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 43 68  code></h3>....Ch
0410: 65 63 6b 73 20 77 68 65 74 68 65 72 20 74 68 65  ecks whether the
0420: 20 67 69 76 65 6e 20 76 61 6c 75 65 20 69 73 20   given value is 
0430: 61 20 6e 61 6e 6f 6d 73 67 20 73 6f 63 6b 65 74  a nanomsg socket
0440: 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  .....<h3>procedu
0450: 72 65 3a 20 3c 63 6f 64 65 3e 28 6f 70 65 6e 2d  re: <code>(open-
0460: 73 6f 63 6b 65 74 20 3c 69 3e 64 6f 6d 61 69 6e  socket <i>domain
0470: 3c 2f 69 3e 20 3c 69 3e 70 72 6f 74 6f 63 6f 6c  </i> <i>protocol
0480: 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33  </i>)</code></h3
0490: 3e 0d 0a 0d 0a 43 72 65 61 74 65 73 20 61 20 6e  >....Creates a n
04a0: 65 77 20 6e 61 6e 6f 6d 73 67 20 73 6f 63 6b 65  ew nanomsg socke
04b0: 74 20 67 69 76 65 6e 20 73 79 6d 62 6f 6c 73 20  t given symbols 
04c0: 74 68 61 74 20 69 64 65 6e 74 69 66 79 20 74 68  that identify th
04d0: 65 20 70 72 6f 74 6f 63 6f 6c 20 74 6f 20 75 73  e protocol to us
04e0: 65 2e 20 41 74 20 73 6f 6d 65 20 70 6f 69 6e 74  e. At some point
04f0: 20 69 6e 20 74 68 65 20 66 75 74 75 72 65 2c 20   in the future, 
0500: 74 68 65 20 73 6f 63 6b 65 74 20 73 68 6f 75 6c  the socket shoul
0510: 64 20 62 65 20 63 6c 6f 73 65 64 20 75 73 69 6e  d be closed usin
0520: 67 20 3c 74 74 3e 63 6c 6f 73 65 2d 73 6f 63 6b  g <tt>close-sock
0530: 65 74 3c 2f 74 74 3e 2e 0d 0a 0d 0a 3c 68 33 3e  et</tt>.....<h3>
0540: 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65  procedure: <code
0550: 3e 28 63 6c 6f 73 65 2d 73 6f 63 6b 65 74 20 3c  >(close-socket <
0560: 69 3e 73 6f 63 6b 65 74 3c 2f 69 3e 29 3c 2f 63  i>socket</i>)</c
0570: 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 43 6c 6f  ode></h3>....Clo
0580: 73 65 73 20 74 68 65 20 67 69 76 65 6e 20 73 6f  ses the given so
0590: 63 6b 65 74 2e 20 49 74 20 64 6f 65 73 20 6e 6f  cket. It does no
05a0: 74 20 68 75 72 74 20 74 6f 20 63 61 6c 6c 20 74  t hurt to call t
05b0: 68 69 73 20 70 72 6f 63 65 64 75 72 65 20 6d 6f  his procedure mo
05c0: 72 65 20 74 68 61 6e 20 6f 6e 63 65 20 6f 6e 20  re than once on 
05d0: 74 68 65 20 73 61 6d 65 20 73 6f 63 6b 65 74 2c  the same socket,
05e0: 20 62 75 74 20 6f 6e 63 65 20 69 74 20 68 61 73   but once it has
05f0: 20 62 65 65 6e 20 61 70 70 6c 69 65 64 20 74 6f   been applied to
0600: 20 61 20 73 6f 63 6b 65 74 2c 20 69 74 20 62 65   a socket, it be
0610: 63 6f 6d 65 73 20 75 6e 75 73 61 62 6c 65 2e 0d  comes unusable..
0620: 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65  ...<h3>procedure
0630: 3a 20 3c 63 6f 64 65 3e 28 73 6f 63 6b 65 74 2d  : <code>(socket-
0640: 6f 70 74 69 6f 6e 20 3c 69 3e 73 6f 63 6b 65 74  option <i>socket
0650: 3c 2f 69 3e 20 3c 69 3e 6c 65 76 65 6c 3c 2f 69  </i> <i>level</i
0660: 3e 20 3c 69 3e 6f 70 74 69 6f 6e 3c 2f 69 3e 29  > <i>option</i>)
0670: 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a  </code></h3>....
0680: 52 65 74 72 69 65 76 65 73 20 73 6f 63 6b 65 74  Retrieves socket
0690: 20 6f 70 74 69 6f 6e 20 64 61 74 61 2e 20 54 68   option data. Th
06a0: 65 20 6f 70 74 69 6f 6e 20 69 73 20 69 64 65 6e  e option is iden
06b0: 74 69 66 69 65 64 20 62 79 20 74 68 65 20 6c 65  tified by the le
06c0: 76 65 6c 20 61 6e 64 20 6f 70 74 69 6f 6e 20 73  vel and option s
06d0: 79 6d 62 6f 6c 73 2e 20 54 68 65 20 76 61 6c 75  ymbols. The valu
06e0: 65 20 69 73 20 72 65 74 75 72 6e 65 64 20 61 73  e is returned as
06f0: 20 61 20 62 79 74 65 76 65 63 74 6f 72 2e 0d 0a   a bytevector...
0700: 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a  ..<h3>procedure:
0710: 20 3c 63 6f 64 65 3e 28 73 6f 63 6b 65 74 2d 6f   <code>(socket-o
0720: 70 74 69 6f 6e 2d 73 65 74 21 20 3c 69 3e 73 6f  ption-set! <i>so
0730: 63 6b 65 74 3c 2f 69 3e 20 3c 69 3e 6c 65 76 65  cket</i> <i>leve
0740: 6c 3c 2f 69 3e 20 3c 69 3e 6f 70 74 69 6f 6e 3c  l</i> <i>option<
0750: 2f 69 3e 20 3c 69 3e 76 3c 2f 69 3e 29 3c 2f 63  /i> <i>v</i>)</c
0760: 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 53 65 74  ode></h3>....Set
0770: 73 20 61 20 73 6f 63 6b 65 74 20 6f 70 74 69 6f  s a socket optio
0780: 6e 2e 20 54 68 65 20 6f 70 74 69 6f 6e 20 69 73  n. The option is
0790: 20 69 64 65 6e 74 69 66 69 65 64 20 62 79 20 74   identified by t
07a0: 68 65 20 6c 65 76 65 6c 20 61 6e 64 20 6f 70 74  he level and opt
07b0: 69 6f 6e 20 73 79 6d 62 6f 6c 73 2e 20 54 68 65  ion symbols. The
07c0: 20 76 61 6c 75 65 73 20 69 73 20 73 70 65 63 69   values is speci
07d0: 66 69 65 64 20 61 73 20 61 20 62 79 74 65 76 65  fied as a byteve
07e0: 63 74 6f 72 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f  ctor.....<h3>pro
07f0: 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 73  cedure: <code>(s
0800: 6f 63 6b 65 74 2d 62 69 6e 64 20 3c 69 3e 73 6f  ocket-bind <i>so
0810: 63 6b 65 74 3c 2f 69 3e 20 3c 69 3e 61 64 64 72  cket</i> <i>addr
0820: 65 73 73 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c  ess</i>)</code><
0830: 2f 68 33 3e 0d 0a 0d 0a 42 69 6e 64 73 20 74 68  /h3>....Binds th
0840: 65 20 73 6f 63 6b 65 74 20 74 6f 20 74 68 65 20  e socket to the 
0850: 6c 6f 63 61 6c 20 61 64 64 72 65 73 73 20 73 70  local address sp
0860: 65 63 69 66 69 65 64 20 61 73 20 61 20 73 74 72  ecified as a str
0870: 69 6e 67 2e 20 52 65 74 75 72 6e 73 20 61 20 6e  ing. Returns a n
0880: 75 6d 65 72 69 63 20 65 6e 64 70 6f 69 6e 74 20  umeric endpoint 
0890: 69 64 65 6e 74 69 66 69 65 72 2e 0d 0a 0d 0a 3c  identifier.....<
08a0: 68 33 3e 70 72 6f 63 65 64 75 72 65 3a 20 3c 63  h3>procedure: <c
08b0: 6f 64 65 3e 28 73 6f 63 6b 65 74 2d 63 6f 6e 6e  ode>(socket-conn
08c0: 65 63 74 20 3c 69 3e 73 6f 63 6b 65 74 3c 2f 69  ect <i>socket</i
08d0: 3e 20 3c 69 3e 61 64 64 72 65 73 73 3c 2f 69 3e  > <i>address</i>
08e0: 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d  )</code></h3>...
08f0: 0a 43 6f 6e 6e 65 63 74 73 20 74 68 65 20 73 6f  .Connects the so
0900: 63 6b 65 74 20 74 6f 20 74 68 65 20 72 65 6d 6f  cket to the remo
0910: 74 65 20 61 64 64 72 65 73 73 20 73 70 65 63 69  te address speci
0920: 66 69 65 64 20 61 73 20 61 20 73 74 72 69 6e 67  fied as a string
0930: 2e 20 52 65 74 75 72 6e 73 20 61 20 6e 75 6d 65  . Returns a nume
0940: 72 69 63 20 65 6e 64 70 6f 69 6e 74 20 69 64 65  ric endpoint ide
0950: 6e 74 69 66 69 65 72 2e 0d 0a 0d 0a 3c 68 33 3e  ntifier.....<h3>
0960: 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65  procedure: <code
0970: 3e 28 73 6f 63 6b 65 74 2d 73 68 75 74 64 6f 77  >(socket-shutdow
0980: 6e 20 3c 69 3e 73 6f 63 6b 65 74 3c 2f 69 3e 20  n <i>socket</i> 
0990: 3c 69 3e 69 64 3c 2f 69 3e 29 3c 2f 63 6f 64 65  <i>id</i>)</code
09a0: 3e 3c 2f 68 33 3e 0d 0a 0d 0a 43 6c 6f 73 65 73  ></h3>....Closes
09b0: 20 74 68 65 20 73 70 65 63 69 66 69 65 64 20 65   the specified e
09c0: 6e 64 70 6f 69 6e 74 20 6f 66 20 74 68 65 20 73  ndpoint of the s
09d0: 6f 63 6b 65 74 2e 0d 0a 0d 0a 3c 68 33 3e 70 72  ocket.....<h3>pr
09e0: 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28  ocedure: <code>(
09f0: 73 6f 63 6b 65 74 2d 73 65 6e 64 20 3c 69 3e 73  socket-send <i>s
0a00: 6f 63 6b 65 74 3c 2f 69 3e 20 3c 69 3e 6d 65 73  ocket</i> <i>mes
0a10: 73 61 67 65 3c 2f 69 3e 20 3c 69 3e 6f 70 74 69  sage</i> <i>opti
0a20: 6f 6e 3c 2f 69 3e 20 2e 2e 2e 29 3c 2f 63 6f 64  on</i> ...)</cod
0a30: 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 53 65 6e 64 73  e></h3>....Sends
0a40: 20 61 20 62 79 74 65 76 65 63 74 6f 72 20 74 68   a bytevector th
0a50: 72 6f 75 67 68 20 74 68 65 20 73 6f 63 6b 65 74  rough the socket
0a60: 2e 20 4f 70 74 69 6f 6e 20 73 79 6d 62 6f 6c 73  . Option symbols
0a70: 20 6d 61 79 20 62 65 20 70 61 73 73 65 64 20 74   may be passed t
0a80: 6f 20 6d 6f 64 69 66 79 20 74 68 65 20 62 65 68  o modify the beh
0a90: 61 76 69 6f 75 72 20 6f 66 20 74 68 65 20 6f 70  aviour of the op
0aa0: 65 72 61 74 69 6f 6e 2e 0d 0a 0d 0a 3c 68 33 3e  eration.....<h3>
0ab0: 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65  procedure: <code
0ac0: 3e 28 73 6f 63 6b 65 74 2d 72 65 63 65 69 76 65  >(socket-receive
0ad0: 20 3c 69 3e 73 6f 63 6b 65 74 3c 2f 69 3e 20 3c   <i>socket</i> <
0ae0: 69 3e 6c 65 6e 67 74 68 3c 2f 69 3e 20 3c 69 3e  i>length</i> <i>
0af0: 6f 70 74 69 6f 6e 3c 2f 69 3e 20 2e 2e 2e 29 3c  option</i> ...)<
0b00: 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d 0a 52  /code></h3>....R
0b10: 65 63 65 69 76 65 73 20 61 20 62 79 74 65 76 65  eceives a byteve
0b20: 63 74 6f 72 20 74 68 72 6f 75 67 68 20 74 68 65  ctor through the
0b30: 20 73 6f 63 6b 65 74 2e 20 54 68 65 20 6d 61 78   socket. The max
0b40: 69 6d 75 6d 20 6c 65 6e 67 74 68 20 6f 66 20 74  imum length of t
0b50: 68 65 20 6d 65 73 73 61 67 65 20 6d 75 73 74 20  he message must 
0b60: 62 65 20 73 70 65 63 69 66 69 65 64 2e 20 4f 70  be specified. Op
0b70: 74 69 6f 6e 20 73 79 6d 62 6f 6c 73 20 6d 61 79  tion symbols may
0b80: 20 62 65 20 70 61 73 73 65 64 20 74 6f 20 6d 6f   be passed to mo
0b90: 64 69 66 79 20 74 68 65 20 62 65 68 61 76 69 6f  dify the behavio
0ba0: 75 72 20 6f 66 20 74 68 65 20 6f 70 65 72 61 74  ur of the operat
0bb0: 69 6f 6e 2e 0d 0a 0d 0a 3c 68 33 3e 73 79 6e 74  ion.....<h3>synt
0bc0: 61 78 3a 20 3c 63 6f 64 65 3e 28 73 6f 63 6b 65  ax: <code>(socke
0bd0: 74 2d 65 76 65 6e 74 20 3c 69 3e 73 79 6d 62 6f  t-event <i>symbo
0be0: 6c 3c 2f 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68  l</i>)</code></h
0bf0: 33 3e 0d 0a 3c 68 33 3e 73 79 6e 74 61 78 3a 20  3>..<h3>syntax: 
0c00: 3c 63 6f 64 65 3e 28 73 6f 63 6b 65 74 2d 65 76  <code>(socket-ev
0c10: 65 6e 74 73 20 3c 69 3e 73 79 6d 62 6f 6c 3c 2f  ents <i>symbol</
0c20: 69 3e 20 2e 2e 2e 29 3c 2f 63 6f 64 65 3e 3c 2f  i> ...)</code></
0c30: 68 33 3e 0d 0a 0d 0a 54 68 65 20 73 6f 63 6b 65  h3>....The socke
0c40: 74 20 65 76 65 6e 74 20 65 6e 75 6d 65 72 61 74  t event enumerat
0c50: 69 6f 6e 20 68 61 73 20 74 68 65 20 6d 65 6d 62  ion has the memb
0c60: 65 72 73 20 3c 74 74 3e 69 6e 3c 2f 74 74 3e 20  ers <tt>in</tt> 
0c70: 61 6e 64 20 3c 74 74 3e 6f 75 74 3c 2f 74 74 3e  and <tt>out</tt>
0c80: 2e 0d 0a 0d 0a 3c 68 33 3e 70 72 6f 63 65 64 75  .....<h3>procedu
0c90: 72 65 3a 20 3c 63 6f 64 65 3e 28 73 6f 63 6b 65  re: <code>(socke
0ca0: 74 2d 70 6f 6c 6c 20 28 28 3c 69 3e 73 6f 63 6b  t-poll ((<i>sock
0cb0: 65 74 3c 2f 69 3e 20 3c 69 3e 73 79 6d 62 6f 6c  et</i> <i>symbol
0cc0: 3c 2f 69 3e 20 2e 2e 2e 29 20 2e 2e 2e 29 20 3c  </i> ...) ...) <
0cd0: 69 3e 74 69 6d 65 6f 75 74 3c 2f 69 3e 29 3c 2f  i>timeout</i>)</
0ce0: 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 3c 68 33 3e  code></h3>..<h3>
0cf0: 70 72 6f 63 65 64 75 72 65 3a 20 3c 63 6f 64 65  procedure: <code
0d00: 3e 28 73 6f 63 6b 65 74 2d 70 6f 6c 6c 20 28 28  >(socket-poll ((
0d10: 3c 69 3e 73 6f 63 6b 65 74 3c 2f 69 3e 20 2e 20  <i>socket</i> . 
0d20: 3c 69 3e 65 76 65 6e 74 73 3c 2f 69 3e 29 20 2e  <i>events</i>) .
0d30: 2e 2e 29 20 3c 69 3e 74 69 6d 65 6f 75 74 3c 2f  ..) <i>timeout</
0d40: 69 3e 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d  i>)</code></h3>.
0d50: 0a 3c 68 33 3e 70 72 6f 63 65 64 75 72 65 3a 20  .<h3>procedure: 
0d60: 3c 63 6f 64 65 3e 28 73 6f 63 6b 65 74 2d 70 6f  <code>(socket-po
0d70: 6c 6c 20 23 28 28 3c 69 3e 73 6f 63 6b 65 74 3c  ll #((<i>socket<
0d80: 2f 69 3e 20 3c 69 3e 73 79 6d 62 6f 6c 3c 2f 69  /i> <i>symbol</i
0d90: 3e 20 2e 2e 2e 29 20 2e 2e 2e 29 20 3c 69 3e 74  > ...) ...) <i>t
0da0: 69 6d 65 6f 75 74 3c 2f 69 3e 29 3c 2f 63 6f 64  imeout</i>)</cod
0db0: 65 3e 3c 2f 68 33 3e 0d 0a 3c 68 33 3e 70 72 6f  e></h3>..<h3>pro
0dc0: 63 65 64 75 72 65 3a 20 3c 63 6f 64 65 3e 28 73  cedure: <code>(s
0dd0: 6f 63 6b 65 74 2d 70 6f 6c 6c 20 23 28 28 3c 69  ocket-poll #((<i
0de0: 3e 73 6f 63 6b 65 74 3c 2f 69 3e 20 2e 20 3c 69  >socket</i> . <i
0df0: 3e 65 76 65 6e 74 73 3c 2f 69 3e 29 20 2e 2e 2e  >events</i>) ...
0e00: 29 20 3c 69 3e 74 69 6d 65 6f 75 74 3c 2f 69 3e  ) <i>timeout</i>
0e10: 29 3c 2f 63 6f 64 65 3e 3c 2f 68 33 3e 0d 0a 0d  )</code></h3>...
0e20: 0a 50 6f 6c 6c 73 20 74 68 65 20 67 69 76 65 6e  .Polls the given
0e30: 20 73 6f 63 6b 65 74 73 20 66 6f 72 20 74 68 65   sockets for the
0e40: 20 73 70 65 63 69 66 69 65 64 20 65 76 65 6e 74   specified event
0e50: 73 2e 20 45 76 65 6e 74 20 73 65 74 73 20 6d 61  s. Event sets ma
0e60: 79 20 62 65 20 73 70 65 63 69 66 69 65 64 20 61  y be specified a
0e70: 73 20 6c 69 73 74 73 20 6f 66 20 73 79 6d 62 6f  s lists of symbo
0e80: 6c 73 20 28 3c 74 74 3e 69 6e 3c 2f 74 74 3e 20  ls (<tt>in</tt> 
0e90: 6f 72 20 3c 74 74 3e 6f 75 74 3c 2f 74 74 3e 29  or <tt>out</tt>)
0ea0: 20 6f 72 20 61 73 20 65 6e 75 6d 65 72 61 74 69   or as enumerati
0eb0: 6f 6e 20 73 65 74 73 2e 0d 0a 0d 0a 52 65 74 75  on sets.....Retu
0ec0: 72 6e 73 20 61 20 6c 69 73 74 20 6f 66 20 70 61  rns a list of pa
0ed0: 69 72 73 20 6f 66 20 73 6f 63 6b 65 74 73 20 61  irs of sockets a
0ee0: 6e 64 20 65 76 65 6e 74 20 65 6e 75 6d 65 72 61  nd event enumera
0ef0: 74 69 6f 6e 20 73 65 74 73 2e 20 54 68 65 20 72  tion sets. The r
0f00: 65 73 75 6c 74 20 63 6f 6e 74 61 69 6e 73 20 61  esult contains a
0f10: 6e 20 65 6c 65 6d 65 6e 74 73 20 66 6f 72 20 65  n elements for e
0f20: 76 65 72 79 20 73 6f 63 6b 65 74 20 66 6f 72 20  very socket for 
0f30: 77 68 69 63 68 20 74 68 65 20 72 65 73 75 6c 74  which the result
0f40: 69 6e 67 20 65 76 65 6e 74 20 73 65 74 20 69 73  ing event set is
0f50: 20 6e 6f 74 20 65 6d 70 74 79 2e 0d 0a 0d 0a 54   not empty.....T
0f60: 68 65 20 74 69 6d 65 6f 75 74 20 69 73 20 73 70  he timeout is sp
0f70: 65 63 69 66 69 65 64 20 69 6e 20 73 65 63 6f 6e  ecified in secon
0f80: 64 73 20 62 75 74 20 68 61 73 20 6d 69 6c 6c 69  ds but has milli
0f90: 73 65 63 6f 6e 64 20 67 72 61 6e 75 6c 61 72 69  second granulari
0fa0: 74 79 2e 0d 0a 0a 5a 20 66 62 31 61 65 34 64 34  ty....Z fb1ae4d4
0fb0: 31 30 33 37 31 39 66 37 36 63 36 34 35 34 30 35  103719f76c645405
0fc0: 38 31 64 30 66 30 66 62 0a                       81d0f0fb.