sockets.xml 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453
  1. <?xml version="1.0" encoding="ISO8859-1"?>
  2. <fpdoc-descriptions>
  3. <!--
  4. $Id$
  5. This file is part of the FPC documentation.
  6. Copyright (C) 1997, by Michael Van Canneyt
  7. The FPC documentation is free text; you can redistribute it and/or
  8. modify it under the terms of the GNU Library General Public License as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version.
  11. The FPC Documentation is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Library General Public License for more details.
  15. You should have received a copy of the GNU Library General Public
  16. License along with the FPC documentation; see the file COPYING.LIB. If not,
  17. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. Boston, MA 02111-1307, USA.
  19. -->
  20. <package name="rtl">
  21. <module name="sockets">
  22. <!-- \FPCexampledir{sockex/} -->
  23. <short>TCP/IP Sockets functionality unit</short>
  24. <descr>
  25. This document describes the SOCKETS unit for Free Pascal.
  26. it was written for linux by Michael Van Canneyt, and ported to Windows
  27. by Florian Klaempfl.
  28. </descr>
  29. <element name="SOCK_STREAM">
  30. <short>Type of socket: stream (connection) type socket (TCP)</short>
  31. </element>
  32. <element name="SOCK_DGRAM">
  33. <short>Type of socket: datagram (conn.less) socket (UDP)</short>
  34. </element>
  35. <element name="SOCK_RAW">
  36. <short>Type of socket: raw socket</short>
  37. </element>
  38. <element name="SOCK_RDM">
  39. <short>Type of socket: reliably-delivered message</short>
  40. </element>
  41. <element name="SOCK_SEQPACKET">
  42. <short>Type of socket: sequential packet socket</short>
  43. </element>
  44. <element name="SOCK_PACKET">
  45. <short>Type of socket: Packet</short>
  46. </element>
  47. <element name="AF_UNSPEC">
  48. <short>Socket domain: Not specified</short>
  49. </element>
  50. <element name="AF_UNIX">
  51. <short>Socket domain: Unix domain sockets</short>
  52. </element>
  53. <element name="AF_INET">
  54. <short>Socket domain: Internet IP Protocol</short>
  55. </element>
  56. <element name="AF_AX25">
  57. <short>Socket domain: Amateur Radio AX.25</short>
  58. </element>
  59. <element name="AF_IPX">
  60. <short>Socket domain: Novell IPX</short>
  61. </element>
  62. <element name="AF_APPLETALK">
  63. <short>Socket domain: Appletalk DDP</short>
  64. </element>
  65. <element name="AF_NETROM">
  66. <short>Socket domain: Amateur radio NetROM</short>
  67. </element>
  68. <element name="AF_BRIDGE">
  69. <short>Socket domain: Multiprotocol bridge</short>
  70. </element>
  71. <element name="AF_AAL5">
  72. <short>Socket domain: Reserved for Werner's ATM</short>
  73. </element>
  74. <element name="AF_X25">
  75. <short>Socket domain: Reserved for X.25 project</short>
  76. </element>
  77. <element name="AF_INET6">
  78. <short>Socket domain: IP version 6</short>
  79. </element>
  80. <element name="AF_MAX">
  81. <short>Socket domain: Maximum value</short>
  82. </element>
  83. <element name="PF_UNSPEC">
  84. <short>Protocol family: Unspecified </short>
  85. </element>
  86. <element name="PF_INET">
  87. <short>Protocol family: Internet IP Protocol</short>
  88. </element>
  89. <element name="PF_AX25">
  90. <short>Protocol family: Amateur Radio AX.25</short>
  91. </element>
  92. <element name="PF_IPX">
  93. <short>Protocol family: Novell IPX</short>
  94. </element>
  95. <element name="PF_APPLETALK">
  96. <short>Protocol family: Appletalk DDP</short>
  97. </element>
  98. <element name="PF_UNIX">
  99. <short>Protocol family: Unix domain sockets</short>
  100. </element>
  101. <element name="PF_NETROM">
  102. <short>Protocol family:Amateur radio NetROM </short>
  103. </element>
  104. <element name="PF_BRIDGE">
  105. <short>Protocol family: Multiprotocol bridge</short>
  106. </element>
  107. <element name="PF_AAL5">
  108. <short>Protocol family: Reserved for Werner's ATM</short>
  109. </element>
  110. <element name="PF_X25">
  111. <short>Protocol family: Reserved for X.25 project</short>
  112. </element>
  113. <element name="PF_INET6">
  114. <short>Protocol family: IP version 6</short>
  115. </element>
  116. <element name="PF_MAX">
  117. <short>Protocol family: Maximum value</short>
  118. </element>
  119. <element name="TSockAddr">
  120. <short>General socket adress record</short>
  121. <descr>
  122. <var>TUnixSockAddr</var> is used to store a general socket addres for the
  123. <link id="Bind"/>, <link id="Recv"/> and <link id="Send"/> calls.
  124. </descr>
  125. </element>
  126. <element name="TSockAddr.family">
  127. <short>Address family</short>
  128. </element>
  129. <element name="TSockAddr.data">
  130. <short>Addres data</short>
  131. </element>
  132. <element name="TUnixSockAddr">
  133. <short>Unix socket address record.</short>
  134. <descr>
  135. <var>TUnixSockAddr</var> is used to store a UNIX socket addres for the
  136. <link id="Bind"/>, <link id="Recv"/> and <link id="Send"/> calls.
  137. </descr>
  138. </element>
  139. <element name="TUnixSockAddr.family">
  140. <short>Address family</short>
  141. </element>
  142. <element name="TUnixSockAddr.Path">
  143. <short>File name</short>
  144. </element>
  145. <element name="TInetSockAddr">
  146. <short>Internet socket address record</short>
  147. <descr>
  148. <var>TUnixSockAddr</var> is used to store a INET socket addres for the
  149. <link id="Bind"/>, <link id="Recv"/> and <link id="Send"/> calls.
  150. </descr>
  151. </element>
  152. <element name="TInetSockAddr.family">
  153. <short>Address family</short>
  154. </element>
  155. <element name="TInetSockAddr.port">
  156. <short>Port number</short>
  157. </element>
  158. <element name="TInetSockAddr.addr">
  159. <short>IP address</short>
  160. </element>
  161. <element name="TInetSockAddr.pad">
  162. <short>Pad data. Do not use.</short>
  163. </element>
  164. <element name="TSockArray">
  165. <short>Type returned by the <link id="SocketPair"/> call.</short>
  166. </element>
  167. <element name="AF_IMPLINK">
  168. <short>Address family: ?</short>
  169. </element>
  170. <!-- constant Visibility: default -->
  171. <element name="AF_PUP">
  172. <short>Address family: ?</short>
  173. </element>
  174. <!-- constant Visibility: default -->
  175. <element name="AF_CHAOS">
  176. <short>Address family: ?</short>
  177. </element>
  178. <!-- constant Visibility: default -->
  179. <element name="AF_NS">
  180. <short>Address family: ?</short>
  181. </element>
  182. <!-- constant Visibility: default -->
  183. <element name="AF_ISO">
  184. <short>Address family: ?</short>
  185. </element>
  186. <!-- constant Visibility: default -->
  187. <element name="AF_OSI">
  188. <short>Address family: ?</short>
  189. </element>
  190. <!-- constant Visibility: default -->
  191. <element name="AF_ECMA">
  192. <short>Address family: ?</short>
  193. </element>
  194. <!-- constant Visibility: default -->
  195. <element name="AF_DATAKIT">
  196. <short>Address family: ?</short>
  197. </element>
  198. <!-- constant Visibility: default -->
  199. <element name="AF_CCITT">
  200. <short>Address family: ?</short>
  201. </element>
  202. <!-- constant Visibility: default -->
  203. <element name="AF_SNA">
  204. <short>Addresss family: Linux SNA project</short>
  205. </element>
  206. <!-- constant Visibility: default -->
  207. <element name="AF_DECnet">
  208. <short>Address family: Reserved for DECnet project.</short>
  209. </element>
  210. <!-- constant Visibility: default -->
  211. <element name="AF_DLI">
  212. <short>Address family: ?</short>
  213. </element>
  214. <!-- constant Visibility: default -->
  215. <element name="AF_LAT">
  216. <short>Address family: ?</short>
  217. </element>
  218. <!-- constant Visibility: default -->
  219. <element name="AF_HYLINK">
  220. <short>Address family: ?</short>
  221. </element>
  222. <!-- constant Visibility: default -->
  223. <element name="AF_ROUTE">
  224. <short>Address family: Alias to emulate 4.4BSD.</short>
  225. </element>
  226. <!-- constant Visibility: default -->
  227. <element name="AF_LINK">
  228. <short>Address family: ?</short>
  229. </element>
  230. <!-- constant Visibility: default -->
  231. <element name="pseudo_AF_XTP">
  232. <short>Address family: ?</short>
  233. </element>
  234. <!-- constant Visibility: default -->
  235. <element name="AF_COIP">
  236. <short>Address family: ?</short>
  237. </element>
  238. <!-- constant Visibility: default -->
  239. <element name="AF_CNT">
  240. <short>Address family: ?</short>
  241. </element>
  242. <!-- constant Visibility: default -->
  243. <element name="pseudo_AF_RTIP">
  244. <short>Address family: ?</short>
  245. </element>
  246. <!-- constant Visibility: default -->
  247. <element name="AF_SIP">
  248. <short>Address family: ?</short>
  249. </element>
  250. <!-- constant Visibility: default -->
  251. <element name="pseudo_AF_PIP">
  252. <short>Address family: ?</short>
  253. </element>
  254. <!-- constant Visibility: default -->
  255. <element name="AF_ISDN">
  256. <short>Address family: ?</short>
  257. </element>
  258. <!-- constant Visibility: default -->
  259. <element name="AF_E164">
  260. <short>Address family: ?</short>
  261. </element>
  262. <!-- constant Visibility: default -->
  263. <element name="pseudo_AF_KEY">
  264. <short>Address family: key management API.</short>
  265. </element>
  266. <!-- constant Visibility: default -->
  267. <element name="AF_NATM">
  268. <short>Address family: ?</short>
  269. </element>
  270. <!-- constant Visibility: default -->
  271. <element name="AF_ATM">
  272. <short>Address family: ?</short>
  273. </element>
  274. <!-- constant Visibility: default -->
  275. <element name="pseudo_AF_HDRCMPLT">
  276. <short>Address family: ?</short>
  277. </element>
  278. <!-- constant Visibility: default -->
  279. <element name="AF_NETGRAPH">
  280. <short>Address family: ?</short>
  281. </element>
  282. <!-- constant Visibility: default -->
  283. <element name="SOCK_MAXADDRLEN">
  284. <short>Maximum socket address length for <link id="Bind"/> call.</short>
  285. <descr>
  286. </descr>
  287. <seealso>
  288. </seealso>
  289. </element>
  290. <!-- constant Visibility: default -->
  291. <element name="PF_IMPLINK">
  292. <short>Protocol Family: ?</short>
  293. </element>
  294. <!-- constant Visibility: default -->
  295. <element name="PF_PUP">
  296. <short>Protocol Family: ?</short>
  297. </element>
  298. <!-- constant Visibility: default -->
  299. <element name="PF_CHAOS">
  300. <short>Protocol Family: ?</short>
  301. </element>
  302. <!-- constant Visibility: default -->
  303. <element name="PF_NS">
  304. <short>Protocol Family: ?</short>
  305. </element>
  306. <!-- constant Visibility: default -->
  307. <element name="PF_ISO">
  308. <short>Protocol Family: ?</short>
  309. </element>
  310. <!-- constant Visibility: default -->
  311. <element name="PF_OSI">
  312. <short>Protocol Family: ?</short>
  313. </element>
  314. <!-- constant Visibility: default -->
  315. <element name="PF_ECMA">
  316. <short>Protocol Family: ?</short>
  317. </element>
  318. <!-- constant Visibility: default -->
  319. <element name="PF_DATAKIT">
  320. <short>Protocol Family: ?</short>
  321. </element>
  322. <!-- constant Visibility: default -->
  323. <element name="PF_CCITT">
  324. <short>Protocol Family: ?</short>
  325. </element>
  326. <!-- constant Visibility: default -->
  327. <element name="PF_SNA">
  328. <short>Protocol Family: Linux SNA project</short>
  329. </element>
  330. <!-- constant Visibility: default -->
  331. <element name="PF_DECnet">
  332. <short>Protocol Family: DECNET project</short>
  333. </element>
  334. <!-- constant Visibility: default -->
  335. <element name="PF_DLI">
  336. <short>Protocol Family: ?</short>
  337. </element>
  338. <!-- constant Visibility: default -->
  339. <element name="PF_LAT">
  340. <short>Protocol Family: ?</short>
  341. </element>
  342. <!-- constant Visibility: default -->
  343. <element name="PF_HYLINK">
  344. <short>Protocol Family: ?</short>
  345. </element>
  346. <!-- constant Visibility: default -->
  347. <element name="PF_ROUTE">
  348. <short>Protocol Family: ?</short>
  349. </element>
  350. <!-- constant Visibility: default -->
  351. <element name="PF_LINK">
  352. <short>Protocol Family: ?</short>
  353. </element>
  354. <!-- constant Visibility: default -->
  355. <element name="PF_XTP">
  356. <short>Protocol Family: ?</short>
  357. </element>
  358. <!-- constant Visibility: default -->
  359. <element name="PF_COIP">
  360. <short>Protocol Family: ?</short>
  361. </element>
  362. <!-- constant Visibility: default -->
  363. <element name="PF_CNT">
  364. <short>Protocol Family: ?</short>
  365. </element>
  366. <!-- constant Visibility: default -->
  367. <element name="PF_SIP">
  368. <short>Protocol Family: ?</short>
  369. </element>
  370. <!-- constant Visibility: default -->
  371. <element name="PF_RTIP">
  372. <short>Protocol Family: ?</short>
  373. </element>
  374. <!-- constant Visibility: default -->
  375. <element name="PF_PIP">
  376. <short>Protocol Family: ?</short>
  377. </element>
  378. <!-- constant Visibility: default -->
  379. <element name="PF_ISDN">
  380. <short>Protocol Family: ?</short>
  381. </element>
  382. <!-- constant Visibility: default -->
  383. <element name="PF_KEY">
  384. <short>Protocol family: Key management API</short>
  385. </element>
  386. <!-- constant Visibility: default -->
  387. <element name="PF_NATM">
  388. <short>Protocol Family: ?</short>
  389. </element>
  390. <!-- constant Visibility: default -->
  391. <element name="PF_ATM">
  392. <short>Protocol Family: ?</short>
  393. </element>
  394. <!-- constant Visibility: default -->
  395. <element name="PF_NETGRAPH">
  396. <short>Protocol Family: ?</short>
  397. </element>
  398. <!-- constant Visibility: default -->
  399. <element name="SOL_SOCKET">
  400. <short>Socket option level: Socket level</short>
  401. </element>
  402. <!-- constant Visibility: default -->
  403. <element name="SO_DEBUG">
  404. <short>Socket option level: debug</short>
  405. </element>
  406. <!-- constant Visibility: default -->
  407. <element name="SO_REUSEADDR">
  408. <short>Socket option: Reuse address</short>
  409. </element>
  410. <!-- constant Visibility: default -->
  411. <element name="SO_TYPE">
  412. <short>Socket option: Type</short>
  413. </element>
  414. <!-- constant Visibility: default -->
  415. <element name="SO_ERROR">
  416. <short>Socket option: Error</short>
  417. </element>
  418. <!-- constant Visibility: default -->
  419. <element name="SO_DONTROUTE">
  420. <short>Socket option: Don't route</short>
  421. </element>
  422. <!-- constant Visibility: default -->
  423. <element name="SO_BROADCAST">
  424. <short>Socket option: Broadcast</short>
  425. </element>
  426. <!-- constant Visibility: default -->
  427. <element name="SO_SNDBUF">
  428. <short>Socket option: Send buffer</short>
  429. </element>
  430. <!-- constant Visibility: default -->
  431. <element name="SO_RCVBUF">
  432. <short>Socket option: receive buffer</short>
  433. </element>
  434. <!-- constant Visibility: default -->
  435. <element name="SO_KEEPALIVE">
  436. <short>Socket option: keep alive</short>
  437. </element>
  438. <!-- constant Visibility: default -->
  439. <element name="SO_OOBINLINE">
  440. <short>Socket option: ?</short>
  441. </element>
  442. <!-- constant Visibility: default -->
  443. <element name="SO_NO_CHECK">
  444. <short>Socket option: ?</short>
  445. </element>
  446. <!-- constant Visibility: default -->
  447. <element name="SO_PRIORITY">
  448. <short>Socket option: ?</short>
  449. </element>
  450. <!-- constant Visibility: default -->
  451. <element name="SO_LINGER">
  452. <short>Socket option: ?</short>
  453. </element>
  454. <!-- constant Visibility: default -->
  455. <element name="SO_BSDCOMPAT">
  456. <short>Socket option: ?</short>
  457. </element>
  458. <!-- constant Visibility: default -->
  459. <element name="SO_PASSCRED">
  460. <short>Socket option: ?</short>
  461. </element>
  462. <!-- constant Visibility: default -->
  463. <element name="SO_PEERCRED">
  464. <short>Socket option: ?</short>
  465. </element>
  466. <!-- constant Visibility: default -->
  467. <element name="SO_RCVLOWAT">
  468. <short>Socket option: ?</short>
  469. </element>
  470. <!-- constant Visibility: default -->
  471. <element name="SO_SNDLOWAT">
  472. <short>Socket option: ?</short>
  473. </element>
  474. <!-- constant Visibility: default -->
  475. <element name="SO_RCVTIMEO">
  476. <short>Socket option: ?</short>
  477. </element>
  478. <!-- constant Visibility: default -->
  479. <element name="SO_SNDTIMEO">
  480. <short>Socket option: ?</short>
  481. </element>
  482. <!-- constant Visibility: default -->
  483. <element name="SO_SECURITY_AUTHENTICATION">
  484. <short>Socket option: ?</short>
  485. </element>
  486. <!-- constant Visibility: default -->
  487. <element name="SO_SECURITY_ENCRYPTION_TRANSPORT">
  488. <short>Socket option: ?</short>
  489. </element>
  490. <!-- constant Visibility: default -->
  491. <element name="SO_SECURITY_ENCRYPTION_NETWORK">
  492. <short>Socket option: ?</short>
  493. </element>
  494. <!-- constant Visibility: default -->
  495. <element name="SO_BINDTODEVICE">
  496. <short>Socket option: ?</short>
  497. </element>
  498. <!-- constant Visibility: default -->
  499. <element name="SO_ATTACH_FILTER">
  500. <short>Socket option: ?</short>
  501. </element>
  502. <!-- constant Visibility: default -->
  503. <element name="SO_DETACH_FILTER">
  504. <short>Socket option: ?</short>
  505. </element>
  506. <!-- constant Visibility: default -->
  507. <element name="SO_PEERNAME">
  508. <short>Socket option: ?</short>
  509. </element>
  510. <!-- constant Visibility: default -->
  511. <element name="SO_TIMESTAMP">
  512. <short>Socket option: ?</short>
  513. </element>
  514. <!-- constant Visibility: default -->
  515. <element name="SCM_TIMESTAMP">
  516. <short>Socket option: ?</short>
  517. </element>
  518. <!-- constant Visibility: default -->
  519. <element name="SO_ACCEPTCONN">
  520. <short>Socket option: ?</short>
  521. </element>
  522. <!-- constant Visibility: default -->
  523. <element name="SHUT_RD">
  524. <short>Shutdown read part of full duplex socket</short>
  525. </element>
  526. <!-- constant Visibility: default -->
  527. <element name="SHUT_WR">
  528. <short>Shutdown write part of full duplex socket</short>
  529. </element>
  530. <!-- constant Visibility: default -->
  531. <element name="SHUT_RDWR">
  532. <short>Shutdown read and write part of full duplex socket</short>
  533. </element>
  534. <!-- alias type Visibility: default -->
  535. <element name="sa_family_t">
  536. <short>Address family type</short>
  537. </element>
  538. <!-- constant Visibility: default -->
  539. <element name="PF_LOCAL">
  540. <short>Protocol family: Unix socket</short>
  541. </element>
  542. <!-- constant Visibility: default -->
  543. <element name="PF_FILE">
  544. <short>Protocol family: Unix socket (alias)</short>
  545. </element>
  546. <!-- constant Visibility: default -->
  547. <element name="AF_LOCAL">
  548. <short>Address family: Unix socket</short>
  549. </element>
  550. <!-- constant Visibility: default -->
  551. <element name="AF_FILE">
  552. <short>Address family: Unix socket (alias)</short>
  553. </element>
  554. <!-- constant Visibility: default -->
  555. <element name="MSG_OOB">
  556. <short>Receive flags: receive out-of-band data.</short>
  557. </element>
  558. <!-- constant Visibility: default -->
  559. <element name="MSG_PEEK">
  560. <short>Receive flags: peek at data, don't remove from buffer.</short>
  561. </element>
  562. <!-- constant Visibility: default -->
  563. <element name="MSG_DONTROUTE">
  564. <short>Send flags: don't use gateway</short>
  565. </element>
  566. <!-- constant Visibility: default -->
  567. <element name="MSG_TRYHARD">
  568. <short>Receive flags: ?</short>
  569. </element>
  570. <!-- constant Visibility: default -->
  571. <element name="MSG_CTRUNC">
  572. <short>Receive flags: Control Data was discarded (buffer too small)</short>
  573. </element>
  574. <!-- constant Visibility: default -->
  575. <element name="MSG_PROXY">
  576. <short>Receive flags: ?</short>
  577. </element>
  578. <!-- constant Visibility: default -->
  579. <element name="MSG_TRUNC">
  580. <short>Receive flags: packet Data was discarded (buffer too small)</short>
  581. </element>
  582. <!-- constant Visibility: default -->
  583. <element name="MSG_DONTWAIT">
  584. <short>Receive flags: Non-blocking operation request.</short>
  585. </element>
  586. <!-- constant Visibility: default -->
  587. <element name="MSG_EOR">
  588. <short>Receive flags: End of record</short>
  589. </element>
  590. <!-- constant Visibility: default -->
  591. <element name="MSG_WAITALL">
  592. <short>Receive flags: Wait till operation completed.</short>
  593. </element>
  594. <!-- constant Visibility: default -->
  595. <element name="MSG_FIN">
  596. <short>Receive flags: ?</short>
  597. </element>
  598. <!-- constant Visibility: default -->
  599. <element name="MSG_SYN">
  600. <short>Receive flags: ?</short>
  601. </element>
  602. <!-- constant Visibility: default -->
  603. <element name="MSG_CONFIRM">
  604. <short>Send flags: Conform connection</short>
  605. </element>
  606. <!-- constant Visibility: default -->
  607. <element name="MSG_RST">
  608. <short>Receive flags: ?</short>
  609. </element>
  610. <!-- constant Visibility: default -->
  611. <element name="MSG_ERRQUERE">
  612. <short>Receive flags: ?</short>
  613. </element>
  614. <!-- constant Visibility: default -->
  615. <element name="MSG_NOSIGNAL">
  616. <short>Receive flags: Suppress SIG_PIPE signal.</short>
  617. </element>
  618. <!-- constant Visibility: default -->
  619. <element name="MSG_MORE">
  620. <short>Receive flags: ?</short>
  621. </element>
  622. <!-- constant Visibility: default -->
  623. <element name="S_IN">
  624. <short>Input socket in socket pair.</short>
  625. </element>
  626. <!-- constant Visibility: default -->
  627. <element name="S_OUT">
  628. <short>Output socket in socket pair</short>
  629. </element>
  630. <!-- record type Visibility: default -->
  631. <element name="in_addr">
  632. <short>General inet socket address.</short>
  633. </element>
  634. <!-- variable Visibility: default -->
  635. <element name="in_addr.s_addr">
  636. <short>Actual address</short>
  637. </element>
  638. <!-- variable Visibility: default -->
  639. <element name="TSockAddr.sa_family">
  640. <short>General socket address: Address family</short>
  641. </element>
  642. <!-- variable Visibility: default -->
  643. <element name="TSockAddr.sa_data">
  644. <short>General socket address: Address data</short>
  645. </element>
  646. <!-- pointer type Visibility: default -->
  647. <element name="pSockAddr">
  648. <short>Pointer to <link id="TSockAddr"/></short>
  649. </element>
  650. <!-- pointer type Visibility: default -->
  651. <element name="pInetSockAddr">
  652. <short>Pointer to <link id="TInetSockAddr"/></short>
  653. </element>
  654. <!-- record type Visibility: default -->
  655. <element name="Tin6_addr">
  656. <short>Alias for <link id="TInetSockAddr6"/></short>
  657. </element>
  658. <!-- pointer type Visibility: default -->
  659. <element name="pIn6_Addr">
  660. <short>Pointer to <link id="Tin6_addr"/></short>
  661. </element>
  662. <!-- record type Visibility: default -->
  663. <element name="TInetSockAddr6">
  664. <short>Record for IPV6 socket address.</short>
  665. </element>
  666. <!-- variable Visibility: default -->
  667. <element name="TInetSockAddr6.sin6_family">
  668. <short>Address family</short>
  669. </element>
  670. <!-- variable Visibility: default -->
  671. <element name="TInetSockAddr6.sin6_port">
  672. <short>Port</short>
  673. </element>
  674. <!-- variable Visibility: default -->
  675. <element name="TInetSockAddr6.sin6_flowinfo">
  676. <short>Flow information.</short>
  677. </element>
  678. <!-- variable Visibility: default -->
  679. <element name="TInetSockAddr6.sin6_addr">
  680. <short>IPV6 address</short>
  681. </element>
  682. <!-- variable Visibility: default -->
  683. <element name="TInetSockAddr6.sin6_scope_id">
  684. <short></short>
  685. </element>
  686. <!-- alias type Visibility: default -->
  687. <element name="sockaddr_in6">
  688. <short>Alias for <link id="TInetSockAddr6"/></short>
  689. </element>
  690. <!-- pointer type Visibility: default -->
  691. <element name="psockaddr_in6">
  692. <short>Pointer to <link id="sockaddr_in6"/></short>
  693. </element>
  694. <!-- array type Visibility: default -->
  695. <element name="TSockPairArray">
  696. <short>Array of sockets, used in <link id="SocketPair"/> call.</short>
  697. </element>
  698. <!-- variable Visibility: default -->
  699. <element name="SocketError">
  700. <short>Contains the error code for the last socket operation.</short>
  701. <descr>
  702. <var>SocketError</var> contains the error code for the last socket
  703. operation. It can be examined to return the last socket error.
  704. </descr>
  705. </element>
  706. <!-- function Visibility: default -->
  707. <element name="fpsocket">
  708. <short>Alias for the <link id="socket"/> call</short>
  709. </element>
  710. <!-- function Visibility: default -->
  711. <element name="fprecv">
  712. <short>Alias for the <link id="recv"/> call</short>
  713. </element>
  714. <!-- function Visibility: default -->
  715. <element name="fprecvfrom">
  716. <short>Alias for the <link id="recvfrom"/> call</short>
  717. </element>
  718. <!-- function Visibility: default -->
  719. <element name="fpsend">
  720. <short>Alias for the <link id="send"/> call</short>
  721. </element>
  722. <!-- function Visibility: default -->
  723. <element name="fpsendto">
  724. <short>Alias for the <link id="send"/> call</short>
  725. </element>
  726. <!-- function Visibility: default -->
  727. <element name="fpbind">
  728. <short>Alias for the <link id="bind"/> call</short>
  729. </element>
  730. <!-- function Visibility: default -->
  731. <element name="fplisten">
  732. <short>Alias for the <link id="listen"/> call</short>
  733. </element>
  734. <!-- function Visibility: default -->
  735. <element name="fpaccept">
  736. <short>Alias for the <link id="accept"/> call</short>
  737. </element>
  738. <!-- function Visibility: default -->
  739. <element name="fpconnect">
  740. <short>Alias for the <link id="connect"/> call</short>
  741. </element>
  742. <!-- function Visibility: default -->
  743. <element name="fpshutdown">
  744. <short>Alias for the <link id="shutdown"/> call</short>
  745. </element>
  746. <!-- function Visibility: default -->
  747. <element name="fpgetsockname">
  748. <short>Alias for the <link id="GetSocketName"/> call</short>
  749. </element>
  750. <!-- function Visibility: default -->
  751. <element name="fpgetpeername">
  752. <short>Alias for the <link id="GetPeerName"/> call</short>
  753. </element>
  754. <!-- function Visibility: default -->
  755. <element name="fpgetsockopt">
  756. <short>Alias for the <link id="GetSocketOptions"/> call</short>
  757. </element>
  758. <!-- function Visibility: default -->
  759. <element name="fpsetsockopt">
  760. <short>Alias for the <link id="SetSocketOptions"/> call</short>
  761. </element>
  762. <!-- function Visibility: default -->
  763. <element name="fpsocketpair">
  764. <short>Alias for the <link id="SocketPair"/> call</short>
  765. </element>
  766. <!-- function Visibility: default -->
  767. <element name="CloseSocket">
  768. <short>Closes a socket handle.</short>
  769. <descr>
  770. <var>CloseSocket</var> closes a socket handle. It returns 0 if the socket
  771. was closed succesfully, -1 if it failed.
  772. </descr>
  773. <errors>
  774. On error, -1 is returned.
  775. </errors>
  776. <seealso>
  777. <link id="Socket"/>
  778. </seealso>
  779. </element>
  780. <!-- function Visibility: default -->
  781. <element name="SendTo">
  782. <short>Send data through an unconnected socket to an address.</short>
  783. <descr>
  784. <var>SendTo</var> sends data from buffer <var>Buf</var> with length
  785. <var>Buflen</var> through socket <var>Sock</var> with options
  786. <var>Flags</var>. The data is sent to address <var>Addr</var>, which has
  787. length <var>AddrLen</var>
  788. </descr>
  789. <errors>
  790. On error, -1 is returned.
  791. </errors>
  792. <seealso>
  793. <link id="Socket"/>
  794. <link id="Send"/>
  795. <link id="RecvFrom"/>
  796. </seealso>
  797. </element>
  798. <!-- function Visibility: default -->
  799. <element name="RecvFrom">
  800. <short>Receive data from an unconnected socket</short>
  801. <descr>
  802. <var>RecvFrom</var> receives data in buffer <var>Buf</var> with maximum
  803. length <var>BufLen</var> from socket <var>Sock</var>.
  804. Receipt is controlled by options in <var>Flags</var>. <var>Addr</var> will
  805. be filled with the address from the sender, and will have length
  806. The function returns the number of bytes received, or -1 on error.
  807. <var>AddrLen</var>.
  808. </descr>
  809. <errors>
  810. On error, -1 is returned.
  811. </errors>
  812. <seealso>
  813. <link id="Socket"/>
  814. <link id="recv"/>
  815. <link id="RecvFrom"/>
  816. </seealso>
  817. </element>
  818. <element name="Accept">
  819. <short>Accept a connection from a socket.</short>
  820. <descr>
  821. <p>
  822. <var>FPAccept</var> accepts a connection from a socket <var>Sock</var>, which was
  823. listening for a connection. If a connection is accepted, a file descriptor
  824. is returned. On error <var>-1</var> is returned. The returned socket may NOT
  825. be used to accept more connections. The original socket remains open.
  826. </p>
  827. <p>
  828. The <var>Accept</var> call fills the address of the connecting entity in
  829. <var>Addr</var>, and sets its length in <var>Addrlen</var>. <var>Addr</var> should
  830. be pointing to enough space, and <var>Addrlen</var> should be set to the
  831. amount of space available, prior to the call.
  832. </p>
  833. <p>
  834. The alternate forms of the <link id="Accept"/> command, with the
  835. <var>Text</var> or <var>File</var> parameters are equivalent
  836. to subsequently calling the regular <link id="Accept"/> function and the
  837. <link id="Sock2Text"/> or <link id="Sock2File"/> functions.
  838. These functions return <var>True</var> if successful, <var>False</var> otherwise.
  839. </p>
  840. </descr>
  841. <errors>
  842. <p>
  843. On error, <var>-1</var> is returned, and errors are reported in
  844. <var>SocketError</var>, and include the following:
  845. </p>
  846. <dl>
  847. <dt>SYS_EBADF</dt><dd>The socket descriptor is invalid.</dd>
  848. <dt>SYS_ENOTSOCK</dt><dd>The descriptor is not a socket.</dd>
  849. <dt>SYS_EOPNOTSUPP</dt><dd>The socket type doesn't support the <var>Listen</var> operation.</dd>
  850. <dt>SYS_EFAULT</dt><dd><var>Addr</var> points outside your address space.</dd>
  851. <dt>SYS_EWOULDBLOCK</dt><dd>The requested operation would block the process.</dd>
  852. </dl>
  853. </errors>
  854. <seealso>
  855. <link id="Listen"/>
  856. <link id="Connect"/>
  857. <link id="Bind"/>
  858. </seealso>
  859. <example file="sockex/socksvr"/>
  860. </element>
  861. <element name="Bind">
  862. <short>Bind a socket to an address.</short>
  863. <descr>
  864. <p>
  865. <var>Bind</var> binds the socket <var>Sock</var> to address <var>Addr</var>. <var>Addr</var>
  866. has length <var>Addrlen</var>.
  867. The function returns <var>True</var> if the call was succesful, <var>False</var> if
  868. not.
  869. </p>
  870. <p>
  871. The form of the <var>Bind</var> command with the <link id="TUnixSockAddr"/>
  872. is equivalent to subsequently calling <link id="Str2UnixSockAddr"/> and the
  873. regular <var>Bind</var> function.
  874. The function returns <var>True</var> if successfull, <var>False</var> otherwise.
  875. </p>
  876. </descr>
  877. <errors>
  878. <p>
  879. Errors are returned in <var>SocketError</var> and include the following:
  880. </p>
  881. <dl>
  882. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  883. <dt>SYS_EINVAL</dt><dd> The socket is already bound to an address,</dd>
  884. <dt>SYS_EACCESS</dt><dd> Address is protected and you don't have permission to open it.</dd>
  885. </dl>
  886. <p>
  887. More arrors can be found in the Unix man pages.
  888. </p>
  889. </errors>
  890. <seealso>
  891. <link id="Socket"/>
  892. </seealso>
  893. </element>
  894. <element name="Connect">
  895. <short>Open a connection to a server socket.</short>
  896. <descr>
  897. <p>
  898. <var>Connect</var> opens a connection to a peer, whose address is described by
  899. <var>Addr</var>. <var>AddrLen</var> contains the length of the address.
  900. The type of <var>Addr</var> depends on the kind of connection you're trying to
  901. make, but is generally one of <var>TSockAddr</var> or <var>TUnixSockAddr</var>.
  902. </p>
  903. <p>
  904. The forms of the <link id="Connect"/> command with the <var>Text</var> or
  905. <var>File</var> arguments are equivalent to subsequently calling the regular <var>Connect</var>
  906. function and the <link id="Sock2Text"/> or <link id="Sock2File"/> functions.
  907. These functions return <var>True</var> if successfull, <var>False</var> otherwise.
  908. </p>
  909. <p>
  910. The <var>Connect</var> function returns a file descriptor if the call
  911. was successfull, <var>-1</var> in case of error.
  912. </p>
  913. </descr>
  914. <errors>
  915. On error, <var>-1</var> is returned and errors are reported in
  916. <var>SocketError</var>.
  917. </errors>
  918. <seealso>
  919. <link id="Listen"/>
  920. <link id="Bind"/>
  921. <link id="Accept"/>
  922. </seealso>
  923. <example file="sockex/sockcli"/>
  924. <example file="sockex/pfinger"/>
  925. </element>
  926. <element name="GetPeerName">
  927. <short>Return the name (address) of the connected peer.</short>
  928. <descr>
  929. <p>
  930. <var>GetPeerName</var> returns the name of the entity connected to the
  931. specified socket <var>Sock</var>. The Socket must be connected for this call to
  932. work.
  933. </p>
  934. <p>
  935. <var>Addr</var> should point to enough space to store the name, the
  936. amount of space pointed to should be set in <var>Addrlen</var>.
  937. When the function returns succesfully, <var>Addr</var> will be filled with the
  938. name, and <var>Addrlen</var> will be set to the length of <var>Addr</var>.
  939. </p>
  940. </descr>
  941. <errors>
  942. <p>
  943. Errors are reported in <var>SocketError</var>, and include the following:
  944. </p>
  945. <dl>
  946. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  947. <dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough buffers to perform the operation.</dd>
  948. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  949. <dt>SYS_EFAULT</dt><dd> <var>Addr</var> points outside your address space.</dd>
  950. <dt>SYS_ENOTCONN</dt><dd> The socket isn't connected.</dd>
  951. </dl>
  952. </errors>
  953. <seealso>
  954. <link id="Connect"/>
  955. <link id="Socket"/>
  956. </seealso>
  957. </element>
  958. <element name="GetSocketName">
  959. <short>Return name of socket.</short>
  960. <descr>
  961. <var>GetSockName</var> returns the current name of the specified socket
  962. <var>Sock</var>. <var>Addr</var> should point to enough space to store the name, the
  963. amount of space pointed to should be set in <var>Addrlen</var>.
  964. When the function returns succesfully, <var>Addr</var> will be filled with the
  965. name, and <var>Addrlen</var> will be set to the length of <var>Addr</var>.
  966. </descr>
  967. <errors>
  968. <p>
  969. Errors are reported in <var>SocketError</var>, and include the following:
  970. </p>
  971. <dl>
  972. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  973. <dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough buffers to perform the operation.</dd>
  974. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  975. <dt>SYS_EFAULT</dt><dd> <var>Addr</var> points outside your address space.</dd>
  976. </dl>
  977. </errors>
  978. <seealso>
  979. <link id="Bind"/>
  980. </seealso>
  981. </element>
  982. <element name="GetSocketOptions">
  983. <short>Get current socket options</short>
  984. <descr>
  985. <p>
  986. <var>GetSocketOptions</var> gets the connection options for socket <var>Sock</var>.
  987. The socket may be obtained from different levels, indicated by <var>Level</var>,
  988. which can be one of the following:
  989. </p>
  990. <dl>
  991. <dt>SOL_SOCKET</dt><dd> From the socket itself. </dd>
  992. <dt>XXX</dt><dd> set <var>Level</var> to <var>XXX</var>, the protocol number of the protocol
  993. which should interprete the option. </dd>
  994. </dl>
  995. <p>
  996. For more information on this call, refer to the unix manual page \seem{getsockopt}{2}.
  997. </p>
  998. </descr>
  999. <errors>
  1000. <p>
  1001. Errors are reported in <var>SocketError</var>, and include the following:
  1002. </p>
  1003. <dl>
  1004. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  1005. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  1006. <dt>SYS_EFAULT</dt><dd> <var>OptVal</var> points outside your address space.</dd>
  1007. </dl>
  1008. </errors>
  1009. <seealso>
  1010. <link id="GetSocketOptions"/>
  1011. </seealso>
  1012. </element>
  1013. <element name="Listen">
  1014. <short>Listen for connections on socket.</short>
  1015. <descr>
  1016. <p>
  1017. <var>Listen</var> listens for up to <var>MaxConnect</var> connections from socket
  1018. <var>Sock</var>. The socket <var>Sock</var> must be of type <var>SOCK_STREAM</var> or
  1019. <var>Sock_SEQPACKET</var>.
  1020. </p>
  1021. <p>
  1022. The function returns <var>True</var> if a connection was accepted, <var>False</var>
  1023. if an error occurred.
  1024. </p>
  1025. </descr>
  1026. <errors>
  1027. <p>
  1028. Errors are reported in <var>SocketError</var>, and include the following:
  1029. </p>
  1030. <dl>
  1031. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  1032. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  1033. <dt>SYS_EOPNOTSUPP</dt><dd> The socket type doesn't support the <var>Listen</var> operation.</dd>
  1034. </dl>
  1035. </errors>
  1036. <seealso>
  1037. <link id="Socket"/>
  1038. <link id="Bind"/>
  1039. <link id="Connect"/>
  1040. </seealso>
  1041. </element>
  1042. <element name="Recv">
  1043. <short>Receive data on socket</short>
  1044. <descr>
  1045. <p>
  1046. <var>Recv</var> reads at most <var>Addrlen</var> bytes from socket <var>Sock</var> into
  1047. address <var>Addr</var>. The socket must be in a connected state.
  1048. <var>Flags</var> can be one of the following:
  1049. </p>
  1050. <dl>
  1051. <dt>1</dt><dd>Process out-of band data.</dd>
  1052. <dt>4</dt><dd>Bypass routing, use a direct interface.</dd>
  1053. <dt>??</dt><dd> Wait for full request or report an error.</dd>
  1054. </dl>
  1055. <p>
  1056. The functions returns the number of bytes actually read from the socket, or
  1057. -1 if a detectable error occurred.
  1058. </p>
  1059. </descr>
  1060. <errors>
  1061. <p>
  1062. Errors are reported in <var>SocketError</var>, and include the following:
  1063. </p>
  1064. <dl>
  1065. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  1066. <dt>SYS_ENOTCONN</dt><dd> The socket isn't connected.</dd>
  1067. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  1068. <dt>SYS_EFAULT</dt><dd> The address is outside your address space.</dd>
  1069. <dt>SYS_EMSGSIZE</dt><dd> The message cannot be sent atomically.</dd>
  1070. <dt>SYS_EWOULDBLOCK</dt><dd> The requested operation would block the process.</dd>
  1071. <dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough free buffers available.</dd>
  1072. </dl>
  1073. </errors>
  1074. <seealso>
  1075. <link id="Send"/>
  1076. </seealso>
  1077. </element>
  1078. <element name="Send">
  1079. <short>Send data through socket</short>
  1080. <descr>
  1081. <p>
  1082. <var>Send</var> sends <var>AddrLen</var> bytes starting from address <var>Addr</var>
  1083. to socket <var>Sock</var>. <var>Sock</var> must be in a connected state.
  1084. The function returns the number of bytes sent, or -1 if a detectable
  1085. error occurred.
  1086. </p>
  1087. <p>
  1088. <var>Flags</var> can be one of the following:
  1089. </p>
  1090. <dl>
  1091. <dt>1</dt><dd>Process out-of band data.</dd>
  1092. <dt>4</dt><dd>Bypass routing, use a direct interface.</dd>
  1093. </dl>
  1094. </descr>
  1095. <errors>
  1096. <p>
  1097. Errors are reported in <var>SocketError</var>, and include the following:
  1098. </p>
  1099. <dl>
  1100. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  1101. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  1102. <dt>SYS_EFAULT</dt><dd> The address is outside your address space.</dd>
  1103. <dt>SYS_EMSGSIZE</dt><dd> The message cannot be sent atomically.</dd>
  1104. <dt>SYS_EWOULDBLOCK</dt><dd> The requested operation would block the process.</dd>
  1105. <dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough free buffers available.</dd>
  1106. </dl>
  1107. </errors>
  1108. <seealso>
  1109. <link id="Recv"/>
  1110. </seealso>
  1111. </element>
  1112. <element name="SetSocketOptions">
  1113. <short>Set socket options.</short>
  1114. <descr>
  1115. <p>
  1116. <var>SetSocketOptions</var> sets the connection options for socket <var>Sock</var>.
  1117. The socket may be manipulated at different levels, indicated by <var>Level</var>,
  1118. which can be one of the following:
  1119. </p>
  1120. <dl>
  1121. <dt>SOL_SOCKET</dt><dd> To manipulate the socket itself. </dd>
  1122. <dt>XXX</dt><dd> set <var>Level</var> to <var>XXX</var>, the protocol number of the protocol
  1123. which should interprete the option. </dd>
  1124. </dl>
  1125. <p>
  1126. For more information on this call, refer to the unix manual page
  1127. <file>setsockopt</file>
  1128. </p>
  1129. </descr>
  1130. <errors>
  1131. <p>
  1132. Errors are reported in <var>SocketError</var>, and include the following:
  1133. </p>
  1134. <dl>
  1135. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  1136. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  1137. <dt>SYS_EFAULT</dt><dd> <var>OptVal</var> points outside your address space.</dd>
  1138. </dl>
  1139. </errors>
  1140. <seealso>
  1141. <link id="GetSocketOptions"/>
  1142. </seealso>
  1143. </element>
  1144. <element name="Shutdown">
  1145. <short>Close one end of full duplex connection.</short>
  1146. <descr>
  1147. <p>
  1148. <var>ShutDown</var> closes one end of a full duplex socket connection, described
  1149. by <var>Sock</var>. The parameter <var>How</var> determines how the connection
  1150. will be shut down, and can be one of the following:
  1151. </p>
  1152. <dl>
  1153. <dt>0</dt><dd>Further receives are disallowed.</dd>
  1154. <dt>1</dt><dd>Further sends are disallowed.</dd>
  1155. <dt>2</dt><dd>Sending nor receiving are allowed.</dd>
  1156. </dl>
  1157. <p>
  1158. On succes, the function returns 0, on error -1 is returned.
  1159. </p>
  1160. </descr>
  1161. <errors>
  1162. <p>
  1163. <var>SocketError</var> is used to report errors, and includes the following:
  1164. </p>
  1165. <dl>
  1166. <dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
  1167. <dt>SYS_ENOTCONN</dt><dd> The socket isn't connected.</dd>
  1168. <dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
  1169. </dl>
  1170. </errors>
  1171. <seealso>
  1172. <link id="Socket"/>
  1173. <link id="Connect"/>
  1174. </seealso>
  1175. </element>
  1176. <element name="Sock2File">
  1177. <short>Convert socket to untyped file descriptors</short>
  1178. <descr>
  1179. <var>Sock2File</var> transforms a socket <var>Sock</var> into 2 Pascal file
  1180. descriptors of type <var>File</var>, one for reading from the socket
  1181. (<var>SockIn</var>), one for writing to the socket (<var>SockOut</var>).
  1182. </descr>
  1183. <errors>
  1184. None.
  1185. </errors>
  1186. <seealso>
  1187. <link id="Socket"/>
  1188. <link id="Sock2Text"/>
  1189. </seealso>
  1190. </element>
  1191. <element name="Sock2Text">
  1192. <short>Convert socket to text file descriptors</short>
  1193. <descr>
  1194. <var>Sock2Text</var> transforms a socket <var>Sock</var> into 2 Pascal file
  1195. descriptors of type <var>Text</var>, one for reading from the socket
  1196. (<var>SockIn</var>), one for writing to the socket (<var>SockOut</var>).
  1197. </descr>
  1198. <errors>
  1199. None.
  1200. </errors>
  1201. <seealso>
  1202. <link id="Socket"/>
  1203. <link id="Sock2File"/>
  1204. </seealso>
  1205. </element>
  1206. <element name="Socket">
  1207. <short>Create new socket</short>
  1208. <descr>
  1209. <p>
  1210. <var>Socket</var> creates a new socket in domain <var>Domain</var>, from type
  1211. <var>SocketType</var> using protocol <var>Protocol</var>.
  1212. The Domain, Socket type and Protocol can be specified using predefined
  1213. constants (see the section on constants for available constants)
  1214. If succesfull, the function returns a socket descriptor, which can be passed
  1215. to a subsequent <link id="Bind"/> call. If unsuccesfull, the function returns -1.
  1216. </p>
  1217. <p>
  1218. for an example, see <link id="Accept"/>.
  1219. </p>
  1220. </descr>
  1221. <errors>
  1222. <p>
  1223. Errors are returned in <var>SocketError</var>, and include the follwing:
  1224. </p>
  1225. <dl>
  1226. <dt>SYS_EPROTONOSUPPORT</dt><dd> The protocol type or the specified protocol is not
  1227. supported within this domain.</dd>
  1228. <dt>SYS_EMFILE</dt><dd>The per-process descriptor table is full.</dd>
  1229. <dt>SYS_ENFILE</dt><dd>The system file table is full.</dd>
  1230. <dt>SYS_EACCESS</dt><dd> Permission to create a socket of the specified type
  1231. and/or protocol is denied.</dd>
  1232. <dt>SYS_ENOBUFS</dt><dd>Insufficient buffer space is available. The socket
  1233. cannot be created until sufficient resources are freed.</dd>
  1234. </dl>
  1235. </errors>
  1236. <seealso>
  1237. <link id="SocketPair"/>, \seem{socket}{2}
  1238. </seealso>
  1239. </element>
  1240. <element name="SocketPair">
  1241. <short>Create socket pair</short>
  1242. <descr>
  1243. <var>SocketPair</var> creates 2 sockets in domain <var>Domain</var>, from type
  1244. <var>SocketType</var> and using protocol <var>Protocol</var>.
  1245. The pair is returned in <var>Pair</var>, and they are indistinguishable.
  1246. The function returns -1 upon error and 0 upon success.
  1247. </descr>
  1248. <errors>
  1249. Errors are reported in <var>SocketError</var>, and are the same as in <link id="Socket"/>
  1250. </errors>
  1251. <seealso>
  1252. <link id="Str2UnixSockAddr"/>
  1253. </seealso>
  1254. </element>
  1255. <element name="Str2UnixSockAddr">
  1256. <short>Convert path to <link id="TUnixSockAddr"/></short>
  1257. <descr>
  1258. <var>Str2UnixSockAddr</var> transforms a Unix socket address in a string to a
  1259. <var>TUnixSockAddr</var> structure which can be passed to the <link id="Bind"/> call.
  1260. </descr>
  1261. <errors>
  1262. None.
  1263. </errors>
  1264. <seealso>
  1265. <link id="Socket"/>
  1266. <link id="Bind"/>
  1267. </seealso>
  1268. </element>
  1269. </module>
  1270. </package>
  1271. </fpdoc-descriptions>