sockets.xml 40 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508
  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. <element name="htonl">
  1270. <short>Convert long integer from host ordered to network ordered</short>
  1271. <descr>
  1272. <var>htonl</var> makes sure that the bytes in <var>host</var> are ordered
  1273. in the correct way for sending over the network and returns the correctly
  1274. ordered result.
  1275. </descr>
  1276. <seealso>
  1277. <link id="htons"/>
  1278. <link id="ntohl"/>
  1279. <link id="ntohs"/>
  1280. </seealso>
  1281. </element>
  1282. <element name="htons">
  1283. <short>Convert short integer from host ordered to network ordered</short>
  1284. <descr>
  1285. <var>htons</var> makes sure that the bytes in <var>host</var> are ordered
  1286. in the correct way for sending over the network and returns the correctly
  1287. ordered result.
  1288. </descr>
  1289. <seealso>
  1290. <link id="htonl"/>
  1291. <link id="ntohl"/>
  1292. <link id="ntohs"/>
  1293. </seealso>
  1294. </element>
  1295. <element name="ntohl">
  1296. <short>Convert long integer from network ordered to host ordered</short>
  1297. <descr>
  1298. <var>ntohs</var> makes sure that the bytes in <var>Net</var>, received from
  1299. the network, are ordered in the correct way for handling by the host
  1300. machinen, and returns the correctly ordered result.
  1301. </descr>
  1302. <seealso>
  1303. <link id="htonl"/>
  1304. <link id="htons"/>
  1305. <link id="ntohs"/>
  1306. </seealso>
  1307. </element>
  1308. <element name="ntohs">
  1309. <short>Convert short integer from network ordered to host ordered</short>
  1310. <descr>
  1311. <var>ntohs</var> makes sure that the bytes in <var>Net</var>, received from
  1312. the network, are ordered in the correct way for handling by the host
  1313. machinen, and returns the correctly ordered result.
  1314. </descr>
  1315. <seealso>
  1316. <link id="htonl"/>
  1317. <link id="htons"/>
  1318. <link id="ntohl"/>
  1319. </seealso>
  1320. </element>
  1321. </module>
  1322. </package>
  1323. </fpdoc-descriptions>