~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to docs/sockets.xml

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="ISO8859-1"?>
2
 
<fpdoc-descriptions>
3
 
<!--  
4
 
 
5
 
   $Id: sockets.xml,v 1.3 2005/04/30 22:08:57 michael Exp $ 
6
 
   This file is part of the FPC documentation. 
7
 
   Copyright (C) 1997, by Michael Van Canneyt 
8
 
 
9
 
   The FPC documentation is free text; you can redistribute it and/or 
10
 
   modify it under the terms of the GNU Library General Public License as 
11
 
   published by the Free Software Foundation; either version 2 of the 
12
 
   License, or (at your option) any later version. 
13
 
 
14
 
   The FPC Documentation is distributed in the hope that it will be useful, 
15
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
16
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
17
 
   Library General Public License for more details. 
18
 
 
19
 
   You should have received a copy of the GNU Library General Public 
20
 
   License along with the FPC documentation; see the file COPYING.LIB.  If not, 
21
 
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 
22
 
   Boston, MA 02111-1307, USA. 
23
 
 -->
24
 
<package name="rtl">
25
 
<module name="sockets">
26
 
<!-- \FPCexampledir{sockex/} -->
27
 
<short>TCP/IP Sockets functionality unit</short>
28
 
<descr>
29
 
This document describes the SOCKETS unit for Free Pascal. 
30
 
it was written for linux by Michael Van Canneyt, and ported to Windows
31
 
by Florian Klaempfl.
32
 
</descr>
33
 
 
34
 
<element name="SOCK_STREAM">
35
 
<short>Type of socket: stream (connection) type socket (TCP)</short>
36
 
</element>
37
 
<element name="SOCK_DGRAM">
38
 
<short>Type of socket: datagram (conn.less) socket (UDP)</short>
39
 
</element>
40
 
<element name="SOCK_RAW">
41
 
<short>Type of socket:  raw socket</short>
42
 
</element>
43
 
<element name="SOCK_RDM">
44
 
<short>Type of socket: reliably-delivered message</short>
45
 
</element>
46
 
<element name="SOCK_SEQPACKET">
47
 
<short>Type of socket: sequential packet socket</short>
48
 
</element>
49
 
<element name="SOCK_PACKET">
50
 
<short>Type of socket: Packet</short>
51
 
</element>
52
 
 
53
 
<element name="AF_UNSPEC">
54
 
<short>Socket domain: Not specified</short>
55
 
</element>
56
 
<element name="AF_UNIX">
57
 
<short>Socket domain: Unix domain sockets</short>
58
 
</element>
59
 
<element name="AF_INET">
60
 
<short>Socket domain: Internet IP Protocol</short>
61
 
</element>
62
 
<element name="AF_AX25">
63
 
<short>Socket domain: Amateur Radio AX.25</short>
64
 
</element>
65
 
<element name="AF_IPX">
66
 
<short>Socket domain: Novell IPX</short>
67
 
</element>
68
 
<element name="AF_APPLETALK">
69
 
<short>Socket domain: Appletalk DDP</short>
70
 
</element>
71
 
<element name="AF_NETROM">
72
 
<short>Socket domain: Amateur radio NetROM</short>
73
 
</element>
74
 
<element name="AF_BRIDGE">
75
 
<short>Socket domain: Multiprotocol bridge</short>
76
 
</element>
77
 
<element name="AF_AAL5">
78
 
<short>Socket domain: Reserved for Werner's ATM</short>
79
 
</element>
80
 
<element name="AF_X25">
81
 
<short>Socket domain: Reserved for X.25 project</short>
82
 
</element>
83
 
<element name="AF_INET6">
84
 
<short>Socket domain: IP version 6</short>
85
 
</element>
86
 
<element name="AF_MAX">
87
 
<short>Socket domain: Maximum value</short>
88
 
</element>
89
 
<element name="PF_UNSPEC">
90
 
<short>Protocol family: Unspecified </short>
91
 
</element>
92
 
<element name="PF_INET">
93
 
<short>Protocol family: Internet IP Protocol</short>
94
 
</element>
95
 
<element name="PF_AX25">
96
 
<short>Protocol family: Amateur Radio AX.25</short>
97
 
</element>
98
 
<element name="PF_IPX">
99
 
<short>Protocol family: Novell IPX</short>
100
 
</element>
101
 
<element name="PF_APPLETALK">
102
 
<short>Protocol family: Appletalk DDP</short>
103
 
</element>
104
 
<element name="PF_UNIX">
105
 
<short>Protocol family: Unix domain sockets</short>
106
 
</element>
107
 
<element name="PF_NETROM">
108
 
<short>Protocol family:Amateur radio NetROM </short>
109
 
</element>
110
 
<element name="PF_BRIDGE">
111
 
<short>Protocol family: Multiprotocol bridge</short>
112
 
</element>
113
 
<element name="PF_AAL5">
114
 
<short>Protocol family: Reserved for Werner's ATM</short>
115
 
</element>
116
 
<element name="PF_X25">
117
 
<short>Protocol family: Reserved for X.25 project</short>
118
 
</element>
119
 
<element name="PF_INET6">
120
 
<short>Protocol family: IP version 6</short>
121
 
</element>
122
 
<element name="PF_MAX">
123
 
<short>Protocol family: Maximum value</short>
124
 
</element>
125
 
 
126
 
<element name="TSockAddr">
127
 
<short>General socket adress record</short>
128
 
<descr>
129
 
<var>TUnixSockAddr</var> is used to store a general socket addres for the
130
 
<link id="Bind"/>, <link id="Recv"/> and <link id="Send"/> calls.
131
 
</descr>
132
 
</element>
133
 
<element name="TSockAddr.family">
134
 
<short>Address family</short>
135
 
</element>
136
 
<element name="TSockAddr.data">
137
 
<short>Addres data</short>
138
 
</element>
139
 
 
140
 
<element name="TUnixSockAddr">
141
 
<short>Unix socket address record.</short>
142
 
<descr>
143
 
<var>TUnixSockAddr</var> is used to store a UNIX socket addres for the
144
 
<link id="Bind"/>, <link id="Recv"/> and <link id="Send"/> calls.
145
 
</descr>
146
 
</element>
147
 
 
148
 
<element name="TUnixSockAddr.family">
149
 
<short>Address family</short>
150
 
</element>
151
 
<element name="TUnixSockAddr.Path">
152
 
<short>File name</short>
153
 
</element>
154
 
 
155
 
<element name="TInetSockAddr">
156
 
<short>Internet socket address record</short>
157
 
<descr>
158
 
<var>TUnixSockAddr</var> is used to store a INET socket addres for the
159
 
<link id="Bind"/>, <link id="Recv"/> and <link id="Send"/> calls.
160
 
</descr>
161
 
</element>
162
 
 
163
 
<element name="TInetSockAddr.family">
164
 
<short>Address family</short>
165
 
</element>
166
 
<element name="TInetSockAddr.port">
167
 
<short>Port number</short>
168
 
</element>
169
 
<element name="TInetSockAddr.addr">
170
 
<short>IP address</short>
171
 
</element>
172
 
<element name="TInetSockAddr.pad">
173
 
<short>Pad data. Do not use.</short>
174
 
</element>
175
 
 
176
 
<element name="TSockArray">
177
 
<short>Type returned by the <link id="SocketPair"/> call.</short>
178
 
</element>
179
 
 
180
 
<element name="AF_IMPLINK">
181
 
<short>Address family: ?</short>
182
 
</element>
183
 
 
184
 
<!-- constant Visibility: default -->
185
 
<element name="AF_PUP">
186
 
<short>Address family: ?</short>
187
 
</element>
188
 
 
189
 
<!-- constant Visibility: default -->
190
 
<element name="AF_CHAOS">
191
 
<short>Address family: ?</short>
192
 
</element>
193
 
 
194
 
<!-- constant Visibility: default -->
195
 
<element name="AF_NS">
196
 
<short>Address family: ?</short>
197
 
</element>
198
 
 
199
 
<!-- constant Visibility: default -->
200
 
<element name="AF_ISO">
201
 
<short>Address family: ?</short>
202
 
</element>
203
 
 
204
 
<!-- constant Visibility: default -->
205
 
<element name="AF_OSI">
206
 
<short>Address family: ?</short>
207
 
</element>
208
 
 
209
 
<!-- constant Visibility: default -->
210
 
<element name="AF_ECMA">
211
 
<short>Address family: ?</short>
212
 
</element>
213
 
 
214
 
<!-- constant Visibility: default -->
215
 
<element name="AF_DATAKIT">
216
 
<short>Address family: ?</short>
217
 
</element>
218
 
 
219
 
<!-- constant Visibility: default -->
220
 
<element name="AF_CCITT">
221
 
<short>Address family: ?</short>
222
 
</element>
223
 
 
224
 
<!-- constant Visibility: default -->
225
 
<element name="AF_SNA">
226
 
<short>Addresss family: Linux SNA project</short>
227
 
</element>
228
 
 
229
 
<!-- constant Visibility: default -->
230
 
<element name="AF_DECnet">
231
 
<short>Address family: Reserved for DECnet project.</short>
232
 
</element>
233
 
 
234
 
<!-- constant Visibility: default -->
235
 
<element name="AF_DLI">
236
 
<short>Address family: ?</short>
237
 
</element>
238
 
 
239
 
<!-- constant Visibility: default -->
240
 
<element name="AF_LAT">
241
 
<short>Address family: ?</short>
242
 
</element>
243
 
 
244
 
<!-- constant Visibility: default -->
245
 
<element name="AF_HYLINK">
246
 
<short>Address family: ?</short>
247
 
</element>
248
 
 
249
 
<!-- constant Visibility: default -->
250
 
<element name="AF_ROUTE">
251
 
<short>Address family: Alias to emulate 4.4BSD.</short>
252
 
</element>
253
 
 
254
 
<!-- constant Visibility: default -->
255
 
<element name="AF_LINK">
256
 
<short>Address family: ?</short>
257
 
</element>
258
 
 
259
 
<!-- constant Visibility: default -->
260
 
<element name="pseudo_AF_XTP">
261
 
<short>Address family: ?</short>
262
 
</element>
263
 
 
264
 
<!-- constant Visibility: default -->
265
 
<element name="AF_COIP">
266
 
<short>Address family: ?</short>
267
 
</element>
268
 
 
269
 
<!-- constant Visibility: default -->
270
 
<element name="AF_CNT">
271
 
<short>Address family: ?</short>
272
 
</element>
273
 
 
274
 
<!-- constant Visibility: default -->
275
 
<element name="pseudo_AF_RTIP">
276
 
<short>Address family: ?</short>
277
 
</element>
278
 
 
279
 
<!-- constant Visibility: default -->
280
 
<element name="AF_SIP">
281
 
<short>Address family: ?</short>
282
 
</element>
283
 
 
284
 
<!-- constant Visibility: default -->
285
 
<element name="pseudo_AF_PIP">
286
 
<short>Address family: ?</short>
287
 
</element>
288
 
 
289
 
<!-- constant Visibility: default -->
290
 
<element name="AF_ISDN">
291
 
<short>Address family: ?</short>
292
 
</element>
293
 
 
294
 
<!-- constant Visibility: default -->
295
 
<element name="AF_E164">
296
 
<short>Address family: ?</short>
297
 
</element>
298
 
 
299
 
<!-- constant Visibility: default -->
300
 
<element name="pseudo_AF_KEY">
301
 
<short>Address family: key management API.</short>
302
 
</element>
303
 
 
304
 
<!-- constant Visibility: default -->
305
 
<element name="AF_NATM">
306
 
<short>Address family: ?</short>
307
 
</element>
308
 
 
309
 
<!-- constant Visibility: default -->
310
 
<element name="AF_ATM">
311
 
<short>Address family: ?</short>
312
 
</element>
313
 
 
314
 
<!-- constant Visibility: default -->
315
 
<element name="pseudo_AF_HDRCMPLT">
316
 
<short>Address family: ?</short>
317
 
</element>
318
 
 
319
 
<!-- constant Visibility: default -->
320
 
<element name="AF_NETGRAPH">
321
 
<short>Address family: ?</short>
322
 
</element>
323
 
 
324
 
<!-- constant Visibility: default -->
325
 
<element name="SOCK_MAXADDRLEN">
326
 
<short>Maximum socket address length for <link id="Bind"/> call.</short>
327
 
<descr>
328
 
</descr>
329
 
<seealso>
330
 
</seealso>
331
 
</element>
332
 
 
333
 
<!-- constant Visibility: default -->
334
 
<element name="PF_IMPLINK">
335
 
<short>Protocol Family: ?</short>
336
 
</element>
337
 
 
338
 
<!-- constant Visibility: default -->
339
 
<element name="PF_PUP">
340
 
<short>Protocol Family: ?</short>
341
 
</element>
342
 
 
343
 
<!-- constant Visibility: default -->
344
 
<element name="PF_CHAOS">
345
 
<short>Protocol Family: ?</short>
346
 
</element>
347
 
 
348
 
<!-- constant Visibility: default -->
349
 
<element name="PF_NS">
350
 
<short>Protocol Family: ?</short>
351
 
</element>
352
 
 
353
 
<!-- constant Visibility: default -->
354
 
<element name="PF_ISO">
355
 
<short>Protocol Family: ?</short>
356
 
</element>
357
 
 
358
 
<!-- constant Visibility: default -->
359
 
<element name="PF_OSI">
360
 
<short>Protocol Family: ?</short>
361
 
</element>
362
 
 
363
 
<!-- constant Visibility: default -->
364
 
<element name="PF_ECMA">
365
 
<short>Protocol Family: ?</short>
366
 
</element>
367
 
 
368
 
<!-- constant Visibility: default -->
369
 
<element name="PF_DATAKIT">
370
 
<short>Protocol Family: ?</short>
371
 
</element>
372
 
 
373
 
<!-- constant Visibility: default -->
374
 
<element name="PF_CCITT">
375
 
<short>Protocol Family: ?</short>
376
 
</element>
377
 
 
378
 
<!-- constant Visibility: default -->
379
 
<element name="PF_SNA">
380
 
<short>Protocol Family: Linux SNA project</short>
381
 
</element>
382
 
 
383
 
<!-- constant Visibility: default -->
384
 
<element name="PF_DECnet">
385
 
<short>Protocol Family: DECNET project</short>
386
 
</element>
387
 
 
388
 
<!-- constant Visibility: default -->
389
 
<element name="PF_DLI">
390
 
<short>Protocol Family: ?</short>
391
 
</element>
392
 
 
393
 
<!-- constant Visibility: default -->
394
 
<element name="PF_LAT">
395
 
<short>Protocol Family: ?</short>
396
 
</element>
397
 
 
398
 
<!-- constant Visibility: default -->
399
 
<element name="PF_HYLINK">
400
 
<short>Protocol Family: ?</short>
401
 
</element>
402
 
 
403
 
<!-- constant Visibility: default -->
404
 
<element name="PF_ROUTE">
405
 
<short>Protocol Family: ?</short>
406
 
</element>
407
 
 
408
 
<!-- constant Visibility: default -->
409
 
<element name="PF_LINK">
410
 
<short>Protocol Family: ?</short>
411
 
</element>
412
 
 
413
 
<!-- constant Visibility: default -->
414
 
<element name="PF_XTP">
415
 
<short>Protocol Family: ?</short>
416
 
</element>
417
 
 
418
 
<!-- constant Visibility: default -->
419
 
<element name="PF_COIP">
420
 
<short>Protocol Family: ?</short>
421
 
</element>
422
 
 
423
 
<!-- constant Visibility: default -->
424
 
<element name="PF_CNT">
425
 
<short>Protocol Family: ?</short>
426
 
</element>
427
 
 
428
 
<!-- constant Visibility: default -->
429
 
<element name="PF_SIP">
430
 
<short>Protocol Family: ?</short>
431
 
</element>
432
 
 
433
 
<!-- constant Visibility: default -->
434
 
<element name="PF_RTIP">
435
 
<short>Protocol Family: ?</short>
436
 
</element>
437
 
 
438
 
<!-- constant Visibility: default -->
439
 
<element name="PF_PIP">
440
 
<short>Protocol Family: ?</short>
441
 
</element>
442
 
 
443
 
<!-- constant Visibility: default -->
444
 
<element name="PF_ISDN">
445
 
<short>Protocol Family: ?</short>
446
 
</element>
447
 
 
448
 
<!-- constant Visibility: default -->
449
 
<element name="PF_KEY">
450
 
<short>Protocol family: Key management API</short>
451
 
</element>
452
 
 
453
 
<!-- constant Visibility: default -->
454
 
<element name="PF_NATM">
455
 
<short>Protocol Family: ?</short>
456
 
</element>
457
 
 
458
 
<!-- constant Visibility: default -->
459
 
<element name="PF_ATM">
460
 
<short>Protocol Family: ?</short>
461
 
</element>
462
 
 
463
 
<!-- constant Visibility: default -->
464
 
<element name="PF_NETGRAPH">
465
 
<short>Protocol Family: ?</short>
466
 
</element>
467
 
 
468
 
<!-- constant Visibility: default -->
469
 
<element name="SOL_SOCKET">
470
 
<short>Socket option level: Socket level</short>
471
 
</element>
472
 
 
473
 
<!-- constant Visibility: default -->
474
 
<element name="SO_DEBUG">
475
 
<short>Socket option level: debug</short>
476
 
</element>
477
 
 
478
 
<!-- constant Visibility: default -->
479
 
<element name="SO_REUSEADDR">
480
 
<short>Socket option: Reuse address</short>
481
 
</element>
482
 
 
483
 
<!-- constant Visibility: default -->
484
 
<element name="SO_TYPE">
485
 
<short>Socket option: Type</short>
486
 
</element>
487
 
 
488
 
<!-- constant Visibility: default -->
489
 
<element name="SO_ERROR">
490
 
<short>Socket option: Error</short>
491
 
</element>
492
 
 
493
 
<!-- constant Visibility: default -->
494
 
<element name="SO_DONTROUTE">
495
 
<short>Socket option: Don't route</short>
496
 
</element>
497
 
 
498
 
<!-- constant Visibility: default -->
499
 
<element name="SO_BROADCAST">
500
 
<short>Socket option: Broadcast</short>
501
 
</element>
502
 
 
503
 
<!-- constant Visibility: default -->
504
 
<element name="SO_SNDBUF">
505
 
<short>Socket option: Send buffer</short>
506
 
</element>
507
 
 
508
 
<!-- constant Visibility: default -->
509
 
<element name="SO_RCVBUF">
510
 
<short>Socket option: receive buffer</short>
511
 
</element>
512
 
 
513
 
<!-- constant Visibility: default -->
514
 
<element name="SO_KEEPALIVE">
515
 
<short>Socket option: keep alive</short>
516
 
</element>
517
 
 
518
 
<!-- constant Visibility: default -->
519
 
<element name="SO_OOBINLINE">
520
 
<short>Socket option: ?</short>
521
 
</element>
522
 
 
523
 
<!-- constant Visibility: default -->
524
 
<element name="SO_NO_CHECK">
525
 
<short>Socket option: ?</short>
526
 
</element>
527
 
 
528
 
<!-- constant Visibility: default -->
529
 
<element name="SO_PRIORITY">
530
 
<short>Socket option: ?</short>
531
 
</element>
532
 
 
533
 
<!-- constant Visibility: default -->
534
 
<element name="SO_LINGER">
535
 
<short>Socket option: ?</short>
536
 
</element>
537
 
 
538
 
<!-- constant Visibility: default -->
539
 
<element name="SO_BSDCOMPAT">
540
 
<short>Socket option: ?</short>
541
 
</element>
542
 
 
543
 
<!-- constant Visibility: default -->
544
 
<element name="SO_PASSCRED">
545
 
<short>Socket option: ?</short>
546
 
</element>
547
 
 
548
 
<!-- constant Visibility: default -->
549
 
<element name="SO_PEERCRED">
550
 
<short>Socket option: ?</short>
551
 
</element>
552
 
 
553
 
<!-- constant Visibility: default -->
554
 
<element name="SO_RCVLOWAT">
555
 
<short>Socket option: ?</short>
556
 
</element>
557
 
 
558
 
<!-- constant Visibility: default -->
559
 
<element name="SO_SNDLOWAT">
560
 
<short>Socket option: ?</short>
561
 
</element>
562
 
 
563
 
<!-- constant Visibility: default -->
564
 
<element name="SO_RCVTIMEO">
565
 
<short>Socket option: ?</short>
566
 
</element>
567
 
 
568
 
<!-- constant Visibility: default -->
569
 
<element name="SO_SNDTIMEO">
570
 
<short>Socket option: ?</short>
571
 
</element>
572
 
 
573
 
<!-- constant Visibility: default -->
574
 
<element name="SO_SECURITY_AUTHENTICATION">
575
 
<short>Socket option: ?</short>
576
 
</element>
577
 
 
578
 
<!-- constant Visibility: default -->
579
 
<element name="SO_SECURITY_ENCRYPTION_TRANSPORT">
580
 
<short>Socket option: ?</short>
581
 
</element>
582
 
 
583
 
<!-- constant Visibility: default -->
584
 
<element name="SO_SECURITY_ENCRYPTION_NETWORK">
585
 
<short>Socket option: ?</short>
586
 
</element>
587
 
 
588
 
<!-- constant Visibility: default -->
589
 
<element name="SO_BINDTODEVICE">
590
 
<short>Socket option: ?</short>
591
 
</element>
592
 
 
593
 
<!-- constant Visibility: default -->
594
 
<element name="SO_ATTACH_FILTER">
595
 
<short>Socket option: ?</short>
596
 
</element>
597
 
 
598
 
<!-- constant Visibility: default -->
599
 
<element name="SO_DETACH_FILTER">
600
 
<short>Socket option: ?</short>
601
 
</element>
602
 
 
603
 
<!-- constant Visibility: default -->
604
 
<element name="SO_PEERNAME">
605
 
<short>Socket option: ?</short>
606
 
</element>
607
 
 
608
 
<!-- constant Visibility: default -->
609
 
<element name="SO_TIMESTAMP">
610
 
<short>Socket option: ?</short>
611
 
</element>
612
 
 
613
 
<!-- constant Visibility: default -->
614
 
<element name="SCM_TIMESTAMP">
615
 
<short>Socket option: ?</short>
616
 
</element>
617
 
 
618
 
<!-- constant Visibility: default -->
619
 
<element name="SO_ACCEPTCONN">
620
 
<short>Socket option: ?</short>
621
 
</element>
622
 
 
623
 
<!-- constant Visibility: default -->
624
 
<element name="SHUT_RD">
625
 
<short>Shutdown read part of full duplex socket</short>
626
 
</element>
627
 
 
628
 
<!-- constant Visibility: default -->
629
 
<element name="SHUT_WR">
630
 
<short>Shutdown write part of full duplex socket</short>
631
 
</element>
632
 
 
633
 
<!-- constant Visibility: default -->
634
 
<element name="SHUT_RDWR">
635
 
<short>Shutdown read and write part of full duplex socket</short>
636
 
</element>
637
 
 
638
 
<!-- alias type Visibility: default -->
639
 
<element name="sa_family_t">
640
 
<short>Address family type</short>
641
 
</element>
642
 
 
643
 
<!-- constant Visibility: default -->
644
 
<element name="PF_LOCAL">
645
 
<short>Protocol family: Unix socket</short>
646
 
</element>
647
 
 
648
 
<!-- constant Visibility: default -->
649
 
<element name="PF_FILE">
650
 
<short>Protocol family: Unix socket (alias)</short>
651
 
</element>
652
 
 
653
 
<!-- constant Visibility: default -->
654
 
<element name="AF_LOCAL">
655
 
<short>Address family: Unix socket</short>
656
 
</element>
657
 
 
658
 
<!-- constant Visibility: default -->
659
 
<element name="AF_FILE">
660
 
<short>Address family: Unix socket (alias)</short>
661
 
</element>
662
 
 
663
 
<!-- constant Visibility: default -->
664
 
<element name="MSG_OOB">
665
 
<short>Receive flags: receive out-of-band data.</short>
666
 
</element>
667
 
 
668
 
<!-- constant Visibility: default -->
669
 
<element name="MSG_PEEK">
670
 
<short>Receive flags: peek at data, don't remove from buffer.</short>
671
 
</element>
672
 
 
673
 
<!-- constant Visibility: default -->
674
 
<element name="MSG_DONTROUTE">
675
 
<short>Send flags: don't use gateway</short>
676
 
</element>
677
 
 
678
 
<!-- constant Visibility: default -->
679
 
<element name="MSG_TRYHARD">
680
 
<short>Receive flags: ?</short>
681
 
</element>
682
 
 
683
 
<!-- constant Visibility: default -->
684
 
<element name="MSG_CTRUNC">
685
 
<short>Receive flags: Control Data was discarded (buffer too small)</short>
686
 
</element>
687
 
 
688
 
<!-- constant Visibility: default -->
689
 
<element name="MSG_PROXY">
690
 
<short>Receive flags: ?</short>
691
 
</element>
692
 
 
693
 
<!-- constant Visibility: default -->
694
 
<element name="MSG_TRUNC">
695
 
<short>Receive flags: packet Data was discarded (buffer too small)</short>
696
 
</element>
697
 
 
698
 
<!-- constant Visibility: default -->
699
 
<element name="MSG_DONTWAIT">
700
 
<short>Receive flags: Non-blocking operation request.</short>
701
 
</element>
702
 
 
703
 
<!-- constant Visibility: default -->
704
 
<element name="MSG_EOR">
705
 
<short>Receive flags: End of record</short>
706
 
</element>
707
 
 
708
 
<!-- constant Visibility: default -->
709
 
<element name="MSG_WAITALL">
710
 
<short>Receive flags: Wait till operation completed.</short>
711
 
</element>
712
 
 
713
 
<!-- constant Visibility: default -->
714
 
<element name="MSG_FIN">
715
 
<short>Receive flags: ?</short>
716
 
</element>
717
 
 
718
 
<!-- constant Visibility: default -->
719
 
<element name="MSG_SYN">
720
 
<short>Receive flags: ?</short>
721
 
</element>
722
 
 
723
 
<!-- constant Visibility: default -->
724
 
<element name="MSG_CONFIRM">
725
 
<short>Send flags: Conform connection</short>
726
 
</element>
727
 
 
728
 
<!-- constant Visibility: default -->
729
 
<element name="MSG_RST">
730
 
<short>Receive flags: ?</short>
731
 
</element>
732
 
 
733
 
<!-- constant Visibility: default -->
734
 
<element name="MSG_ERRQUERE">
735
 
<short>Receive flags: ?</short>
736
 
</element>
737
 
 
738
 
<!-- constant Visibility: default -->
739
 
<element name="MSG_NOSIGNAL">
740
 
<short>Receive flags: Suppress SIG_PIPE signal.</short>
741
 
</element>
742
 
 
743
 
<!-- constant Visibility: default -->
744
 
<element name="MSG_MORE">
745
 
<short>Receive flags: ?</short>
746
 
</element>
747
 
 
748
 
<!-- constant Visibility: default -->
749
 
<element name="S_IN">
750
 
<short>Input socket in socket pair.</short>
751
 
</element>
752
 
 
753
 
<!-- constant Visibility: default -->
754
 
<element name="S_OUT">
755
 
<short>Output socket in socket pair</short>
756
 
</element>
757
 
 
758
 
<!-- record type Visibility: default -->
759
 
<element name="in_addr">
760
 
<short>General inet socket address.</short>
761
 
</element>
762
 
 
763
 
<!-- variable Visibility: default -->
764
 
<element name="in_addr.s_addr">
765
 
<short>Actual address</short>
766
 
</element>
767
 
 
768
 
<!-- variable Visibility: default -->
769
 
<element name="TSockAddr.sa_family">
770
 
<short>General socket address: Address family</short>
771
 
</element>
772
 
 
773
 
<!-- variable Visibility: default -->
774
 
<element name="TSockAddr.sa_data">
775
 
<short>General socket address: Address data</short>
776
 
</element>
777
 
 
778
 
<!-- pointer type Visibility: default -->
779
 
<element name="pSockAddr">
780
 
<short>Pointer to <link id="TSockAddr"/></short>
781
 
</element>
782
 
 
783
 
<!-- pointer type Visibility: default -->
784
 
<element name="pInetSockAddr">
785
 
<short>Pointer to <link id="TInetSockAddr"/></short>
786
 
</element>
787
 
 
788
 
<!-- record type Visibility: default -->
789
 
<element name="Tin6_addr">
790
 
<short>Alias for <link id="TInetSockAddr6"/></short>
791
 
</element>
792
 
 
793
 
<!-- pointer type Visibility: default -->
794
 
<element name="pIn6_Addr">
795
 
<short>Pointer to <link id="Tin6_addr"/></short>
796
 
</element>
797
 
 
798
 
<!-- record type Visibility: default -->
799
 
<element name="TInetSockAddr6">
800
 
<short>Record for IPV6 socket address.</short>
801
 
</element>
802
 
 
803
 
<!-- variable Visibility: default -->
804
 
<element name="TInetSockAddr6.sin6_family">
805
 
<short>Address family</short>
806
 
</element>
807
 
 
808
 
<!-- variable Visibility: default -->
809
 
<element name="TInetSockAddr6.sin6_port">
810
 
<short>Port</short>
811
 
</element>
812
 
 
813
 
<!-- variable Visibility: default -->
814
 
<element name="TInetSockAddr6.sin6_flowinfo">
815
 
<short>Flow information.</short>
816
 
</element>
817
 
 
818
 
<!-- variable Visibility: default -->
819
 
<element name="TInetSockAddr6.sin6_addr">
820
 
<short>IPV6 address</short>
821
 
</element>
822
 
 
823
 
<!-- variable Visibility: default -->
824
 
<element name="TInetSockAddr6.sin6_scope_id">
825
 
<short></short>
826
 
</element>
827
 
 
828
 
<!-- alias type Visibility: default -->
829
 
<element name="sockaddr_in6">
830
 
<short>Alias for <link id="TInetSockAddr6"/></short>
831
 
</element>
832
 
 
833
 
<!-- pointer type Visibility: default -->
834
 
<element name="psockaddr_in6">
835
 
<short>Pointer to <link id="sockaddr_in6"/></short>
836
 
</element>
837
 
 
838
 
<!-- array type Visibility: default -->
839
 
<element name="TSockPairArray">
840
 
<short>Array of sockets, used in <link id="SocketPair"/> call.</short>
841
 
</element>
842
 
 
843
 
<!-- variable Visibility: default -->
844
 
<element name="SocketError">
845
 
<short>Contains the error code for the last socket operation.</short>
846
 
<descr>
847
 
<var>SocketError</var> contains the error code for the last socket
848
 
operation. It can be examined to return the last socket error. 
849
 
</descr>
850
 
</element>
851
 
 
852
 
<!-- function Visibility: default -->
853
 
<element name="fpsocket">
854
 
<short>Alias for the <link id="socket"/> call</short>
855
 
</element>
856
 
 
857
 
<!-- function Visibility: default -->
858
 
<element name="fprecv">
859
 
<short>Alias for the <link id="recv"/> call</short>
860
 
</element>
861
 
 
862
 
<!-- function Visibility: default -->
863
 
<element name="fprecvfrom">
864
 
<short>Alias for the <link id="recvfrom"/> call</short>
865
 
</element>
866
 
 
867
 
<!-- function Visibility: default -->
868
 
<element name="fpsend">
869
 
<short>Alias for the <link id="send"/> call</short>
870
 
</element>
871
 
 
872
 
<!-- function Visibility: default -->
873
 
<element name="fpsendto">
874
 
<short>Alias for the <link id="send"/> call</short>
875
 
</element>
876
 
 
877
 
<!-- function Visibility: default -->
878
 
<element name="fpbind">
879
 
<short>Alias for the <link id="bind"/> call</short>
880
 
</element>
881
 
 
882
 
<!-- function Visibility: default -->
883
 
<element name="fplisten">
884
 
<short>Alias for the <link id="listen"/> call</short>
885
 
</element>
886
 
 
887
 
<!-- function Visibility: default -->
888
 
<element name="fpaccept">
889
 
<short>Alias for the <link id="accept"/> call</short>
890
 
</element>
891
 
 
892
 
<!-- function Visibility: default -->
893
 
<element name="fpconnect">
894
 
<short>Alias for the <link id="connect"/> call</short>
895
 
</element>
896
 
 
897
 
<!-- function Visibility: default -->
898
 
<element name="fpshutdown">
899
 
<short>Alias for the <link id="shutdown"/> call</short>
900
 
</element>
901
 
 
902
 
<!-- function Visibility: default -->
903
 
<element name="fpgetsockname">
904
 
<short>Alias for the <link id="GetSocketName"/> call</short>
905
 
</element>
906
 
 
907
 
<!-- function Visibility: default -->
908
 
<element name="fpgetpeername">
909
 
<short>Alias for the <link id="GetPeerName"/> call</short>
910
 
</element>
911
 
 
912
 
<!-- function Visibility: default -->
913
 
<element name="fpgetsockopt">
914
 
<short>Alias for the <link id="GetSocketOptions"/> call</short>
915
 
</element>
916
 
 
917
 
<!-- function Visibility: default -->
918
 
<element name="fpsetsockopt">
919
 
<short>Alias for the <link id="SetSocketOptions"/> call</short>
920
 
</element>
921
 
 
922
 
<!-- function Visibility: default -->
923
 
<element name="fpsocketpair">
924
 
<short>Alias for the <link id="SocketPair"/> call</short>
925
 
</element>
926
 
 
927
 
<!-- function Visibility: default -->
928
 
<element name="CloseSocket">
929
 
<short>Closes a socket handle.</short>
930
 
<descr>
931
 
<var>CloseSocket</var> closes a socket handle. It returns 0 if the socket
932
 
was closed succesfully, -1 if it failed.
933
 
</descr>
934
 
<errors>
935
 
On error, -1 is returned.
936
 
</errors>
937
 
<seealso>
938
 
<link id="Socket"/>
939
 
</seealso>
940
 
</element>
941
 
 
942
 
<!-- function Visibility: default -->
943
 
<element name="SendTo">
944
 
<short>Send data through an unconnected socket to an address.</short>
945
 
<descr>
946
 
<var>SendTo</var> sends data from buffer <var>Buf</var> with length
947
 
<var>Buflen</var> through socket <var>Sock</var> with options
948
 
<var>Flags</var>. The data is sent to address <var>Addr</var>, which has
949
 
length <var>AddrLen</var>
950
 
</descr>
951
 
<errors>
952
 
On error, -1 is returned.
953
 
</errors>
954
 
<seealso>
955
 
<link id="Socket"/>
956
 
<link id="Send"/>
957
 
<link id="RecvFrom"/>
958
 
</seealso>
959
 
</element>
960
 
 
961
 
<!-- function Visibility: default -->
962
 
<element name="RecvFrom">
963
 
<short>Receive data from an unconnected socket</short>
964
 
<descr>
965
 
<var>RecvFrom</var> receives data in buffer <var>Buf</var> with maximum
966
 
length <var>BufLen</var> from socket <var>Sock</var>. 
967
 
Receipt is controlled by options in <var>Flags</var>. <var>Addr</var> will
968
 
be filled with the address from the sender, and will have length
969
 
The function returns the number of bytes received, or -1 on error.
970
 
<var>AddrLen</var>.
971
 
</descr>
972
 
<errors>
973
 
On error, -1 is returned.
974
 
</errors>
975
 
<seealso>
976
 
<link id="Socket"/>
977
 
<link id="recv"/>
978
 
<link id="RecvFrom"/>
979
 
</seealso>
980
 
</element>
981
 
 
982
 
<element name="Accept">
983
 
<short>Accept a connection from a socket.</short>
984
 
<descr>
985
 
<p>
986
 
<var>FPAccept</var> accepts a connection from a socket <var>Sock</var>, which was
987
 
listening for a connection. If a connection is accepted, a file descriptor
988
 
is returned. On error <var>-1</var> is returned. The returned socket may NOT 
989
 
be used to accept more connections.  The original socket remains open.
990
 
</p>
991
 
<p>
992
 
The <var>Accept</var> call fills the address of the connecting entity in 
993
 
<var>Addr</var>, and sets its length in <var>Addrlen</var>. <var>Addr</var> should 
994
 
be pointing to enough space, and <var>Addrlen</var> should be set to the 
995
 
amount of space available, prior to the call.
996
 
</p>
997
 
<p>
998
 
The alternate forms of the <link id="Accept"/> command, with the
999
 
<var>Text</var> or <var>File</var> parameters are equivalent
1000
 
to subsequently calling the regular <link id="Accept"/> function and the
1001
 
<link id="Sock2Text"/> or <link id="Sock2File"/> functions. 
1002
 
These functions return <var>True</var> if successful, <var>False</var> otherwise.
1003
 
</p>
1004
 
</descr>
1005
 
<errors>
1006
 
<p>
1007
 
On error, <var>-1</var> is returned, and errors are reported in 
1008
 
<var>SocketError</var>, and include the following:
1009
 
</p>
1010
 
<dl>
1011
 
<dt>SYS_EBADF</dt><dd>The socket descriptor is invalid.</dd>
1012
 
<dt>SYS_ENOTSOCK</dt><dd>The descriptor is not a socket.</dd>
1013
 
<dt>SYS_EOPNOTSUPP</dt><dd>The socket type doesn't support the <var>Listen</var> operation.</dd>
1014
 
<dt>SYS_EFAULT</dt><dd><var>Addr</var> points outside your address space.</dd>
1015
 
<dt>SYS_EWOULDBLOCK</dt><dd>The requested operation would block the process.</dd>
1016
 
</dl>
1017
 
</errors>
1018
 
<seealso>
1019
 
<link id="Listen"/>
1020
 
<link id="Connect"/>
1021
 
<link id="Bind"/>
1022
 
</seealso>
1023
 
<example file="sockex/socksvr"/>
1024
 
</element>
1025
 
 
1026
 
<element name="Bind">
1027
 
<short>Bind a socket to an address.</short>
1028
 
<descr>
1029
 
<p>
1030
 
<var>Bind</var> binds the socket <var>Sock</var> to address <var>Addr</var>. <var>Addr</var>
1031
 
has length <var>Addrlen</var>.
1032
 
The function returns <var>True</var> if the call was succesful, <var>False</var> if
1033
 
not.
1034
 
</p>
1035
 
<p>
1036
 
The form of the <var>Bind</var> command with the <link id="TUnixSockAddr"/>
1037
 
is equivalent to subsequently calling <link id="Str2UnixSockAddr"/> and the 
1038
 
regular <var>Bind</var> function.
1039
 
The function returns <var>True</var> if successfull, <var>False</var> otherwise.
1040
 
</p>
1041
 
</descr>
1042
 
<errors>
1043
 
<p>
1044
 
Errors are returned in <var>SocketError</var> and include the following:
1045
 
</p>
1046
 
<dl>
1047
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1048
 
<dt>SYS_EINVAL</dt><dd> The socket is already bound to an address,</dd>
1049
 
<dt>SYS_EACCESS</dt><dd> Address is protected and you don't have permission to open it.</dd>
1050
 
</dl>
1051
 
<p>
1052
 
More arrors can be found in the Unix man pages.
1053
 
</p>
1054
 
</errors>
1055
 
<seealso>
1056
 
<link id="Socket"/>
1057
 
</seealso>
1058
 
</element>
1059
 
 
1060
 
<element name="Connect">
1061
 
<short>Open a connection to a server socket.</short>
1062
 
<descr>
1063
 
<p>
1064
 
<var>Connect</var> opens a connection to a peer, whose address is described by
1065
 
<var>Addr</var>. <var>AddrLen</var> contains the length of the address.
1066
 
The type of <var>Addr</var> depends on the kind of connection you're trying to
1067
 
make, but is generally one of <var>TSockAddr</var> or <var>TUnixSockAddr</var>.
1068
 
</p>
1069
 
<p>
1070
 
The forms of the <link id="Connect"/> command with the <var>Text</var> or
1071
 
<var>File</var> arguments are equivalent to subsequently calling the regular <var>Connect</var> 
1072
 
function and the  <link id="Sock2Text"/> or <link id="Sock2File"/> functions.
1073
 
These functions return <var>True</var> if successfull, <var>False</var> otherwise.
1074
 
</p>
1075
 
<p>
1076
 
The <var>Connect</var> function returns a file descriptor if the call
1077
 
was successfull, <var>-1</var> in case of error.
1078
 
</p>
1079
 
</descr>
1080
 
<errors>
1081
 
On error, <var>-1</var> is returned and errors are reported in 
1082
 
<var>SocketError</var>.
1083
 
</errors>
1084
 
<seealso>
1085
 
<link id="Listen"/>
1086
 
<link id="Bind"/>
1087
 
<link id="Accept"/>
1088
 
</seealso>
1089
 
<example file="sockex/sockcli"/>
1090
 
<example file="sockex/pfinger"/>
1091
 
</element>
1092
 
 
1093
 
<element name="GetPeerName">
1094
 
<short>Return the name (address) of the connected peer.</short>
1095
 
<descr>
1096
 
<p>
1097
 
<var>GetPeerName</var> returns the name of the entity connected to the 
1098
 
specified socket <var>Sock</var>. The Socket must be connected for this call to
1099
 
work. 
1100
 
</p>
1101
 
<p>
1102
 
<var>Addr</var> should point to enough space to store the name, the
1103
 
amount of space pointed to should be set in <var>Addrlen</var>. 
1104
 
When the function returns succesfully, <var>Addr</var> will be filled with the 
1105
 
name, and <var>Addrlen</var> will be set to the length of <var>Addr</var>.
1106
 
</p>
1107
 
</descr>
1108
 
<errors>
1109
 
<p>
1110
 
Errors are reported in <var>SocketError</var>, and include the following:
1111
 
</p>
1112
 
<dl>
1113
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1114
 
<dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough buffers to perform the operation.</dd>
1115
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1116
 
<dt>SYS_EFAULT</dt><dd> <var>Addr</var> points outside your address space.</dd>
1117
 
<dt>SYS_ENOTCONN</dt><dd> The socket isn't connected.</dd>
1118
 
</dl>
1119
 
</errors>
1120
 
<seealso>
1121
 
<link id="Connect"/>
1122
 
<link id="Socket"/>
1123
 
</seealso>
1124
 
</element>
1125
 
 
1126
 
<element name="GetSocketName">
1127
 
<short>Return name of socket.</short>
1128
 
<descr>
1129
 
<var>GetSockName</var> returns the current name of the specified socket
1130
 
<var>Sock</var>. <var>Addr</var> should point to enough space to store the name, the
1131
 
amount of space pointed to should be set in <var>Addrlen</var>. 
1132
 
When the function returns succesfully, <var>Addr</var> will be filled with the 
1133
 
name, and <var>Addrlen</var> will be set to the length of <var>Addr</var>.
1134
 
</descr>
1135
 
<errors>
1136
 
<p>
1137
 
Errors are reported in <var>SocketError</var>, and include the following:
1138
 
</p>
1139
 
<dl>
1140
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1141
 
<dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough buffers to perform the operation.</dd>
1142
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1143
 
<dt>SYS_EFAULT</dt><dd> <var>Addr</var> points outside your address space.</dd>
1144
 
</dl>
1145
 
</errors>
1146
 
<seealso>
1147
 
<link id="Bind"/>
1148
 
</seealso>
1149
 
</element>
1150
 
 
1151
 
<element name="GetSocketOptions">
1152
 
<short>Get current socket options</short>
1153
 
<descr>
1154
 
<p>
1155
 
<var>GetSocketOptions</var> gets the connection options for socket <var>Sock</var>.
1156
 
The socket may be obtained from different levels, indicated by <var>Level</var>,
1157
 
which can be one of the following:
1158
 
</p>
1159
 
<dl>
1160
 
<dt>SOL_SOCKET</dt><dd> From the socket itself. </dd>
1161
 
<dt>XXX</dt><dd> set <var>Level</var> to <var>XXX</var>, the protocol number of the protocol
1162
 
which should interprete the option. </dd>
1163
 
</dl>
1164
 
<p>
1165
 
For more information on this call, refer to the unix manual page \seem{getsockopt}{2}.
1166
 
</p>
1167
 
</descr>
1168
 
<errors>
1169
 
<p>
1170
 
Errors are reported in <var>SocketError</var>, and include the following:
1171
 
</p>
1172
 
<dl>
1173
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1174
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1175
 
<dt>SYS_EFAULT</dt><dd> <var>OptVal</var> points outside your address space.</dd>
1176
 
</dl>
1177
 
</errors>
1178
 
<seealso>
1179
 
<link id="GetSocketOptions"/>
1180
 
</seealso>
1181
 
</element>
1182
 
 
1183
 
<element name="Listen">
1184
 
<short>Listen for connections on socket.</short>
1185
 
<descr>
1186
 
<p>
1187
 
<var>Listen</var> listens for up to <var>MaxConnect</var> connections from socket
1188
 
<var>Sock</var>. The socket <var>Sock</var> must be of type <var>SOCK_STREAM</var> or
1189
 
<var>Sock_SEQPACKET</var>.
1190
 
</p>
1191
 
<p>
1192
 
The function returns <var>True</var> if a connection was accepted, <var>False</var> 
1193
 
if an error occurred.
1194
 
</p>
1195
 
</descr>
1196
 
<errors>
1197
 
<p>
1198
 
Errors are reported in <var>SocketError</var>, and include the following:
1199
 
</p>
1200
 
<dl>
1201
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1202
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1203
 
<dt>SYS_EOPNOTSUPP</dt><dd> The socket type doesn't support the <var>Listen</var> operation.</dd>
1204
 
</dl>
1205
 
</errors>
1206
 
<seealso>
1207
 
<link id="Socket"/>
1208
 
<link id="Bind"/>
1209
 
<link id="Connect"/>
1210
 
</seealso>
1211
 
</element>
1212
 
 
1213
 
<element name="Recv">
1214
 
<short>Receive data on socket</short>
1215
 
<descr>
1216
 
<p>
1217
 
<var>Recv</var> reads at most <var>Addrlen</var> bytes from socket <var>Sock</var> into
1218
 
address <var>Addr</var>. The socket must be in a connected state.
1219
 
<var>Flags</var> can be one of the following:
1220
 
</p>
1221
 
<dl>
1222
 
<dt>1</dt><dd>Process out-of band data.</dd>
1223
 
<dt>4</dt><dd>Bypass routing, use a direct interface.</dd>
1224
 
<dt>??</dt><dd> Wait for full request or report an error.</dd>
1225
 
</dl>
1226
 
<p>
1227
 
The functions returns the number of bytes actually read from the socket, or
1228
 
-1 if a detectable error occurred.
1229
 
</p>
1230
 
</descr>
1231
 
<errors>
1232
 
<p>
1233
 
Errors are reported in <var>SocketError</var>, and include the following:
1234
 
</p>
1235
 
<dl>
1236
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1237
 
<dt>SYS_ENOTCONN</dt><dd> The socket isn't connected.</dd>
1238
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1239
 
<dt>SYS_EFAULT</dt><dd> The address is outside your address space.</dd>
1240
 
<dt>SYS_EMSGSIZE</dt><dd> The message cannot be sent atomically.</dd>
1241
 
<dt>SYS_EWOULDBLOCK</dt><dd> The requested operation would block the process.</dd>
1242
 
<dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough free buffers available.</dd>
1243
 
</dl>
1244
 
</errors>
1245
 
<seealso>
1246
 
<link id="Send"/>
1247
 
</seealso>
1248
 
</element>
1249
 
 
1250
 
<element name="Send">
1251
 
<short>Send data through socket</short>
1252
 
<descr>
1253
 
<p>
1254
 
<var>Send</var> sends <var>AddrLen</var> bytes starting from address <var>Addr</var>
1255
 
to socket <var>Sock</var>. <var>Sock</var> must be in a connected state.
1256
 
The function returns the number of bytes sent, or -1 if a detectable 
1257
 
error occurred.
1258
 
</p>
1259
 
<p>
1260
 
<var>Flags</var> can be one of the following:
1261
 
</p>
1262
 
<dl>
1263
 
<dt>1</dt><dd>Process out-of band data.</dd>
1264
 
<dt>4</dt><dd>Bypass routing, use a direct interface.</dd>
1265
 
</dl>
1266
 
</descr>
1267
 
<errors>
1268
 
<p>
1269
 
Errors are reported in <var>SocketError</var>, and include the following:
1270
 
</p>
1271
 
<dl>
1272
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1273
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1274
 
<dt>SYS_EFAULT</dt><dd> The address is outside your address space.</dd>
1275
 
<dt>SYS_EMSGSIZE</dt><dd> The message cannot be sent atomically.</dd>
1276
 
<dt>SYS_EWOULDBLOCK</dt><dd> The requested operation would block the process.</dd>
1277
 
<dt>SYS_ENOBUFS</dt><dd> The system doesn't have enough free buffers available.</dd>
1278
 
</dl>
1279
 
</errors>
1280
 
<seealso>
1281
 
<link id="Recv"/>
1282
 
</seealso>
1283
 
</element>
1284
 
 
1285
 
<element name="SetSocketOptions">
1286
 
<short>Set socket options.</short>
1287
 
<descr>
1288
 
<p>
1289
 
<var>SetSocketOptions</var> sets the connection options for socket <var>Sock</var>.
1290
 
The socket may be manipulated at different levels, indicated by <var>Level</var>,
1291
 
which can be one of the following:
1292
 
</p>
1293
 
<dl>
1294
 
<dt>SOL_SOCKET</dt><dd> To manipulate the socket itself. </dd>
1295
 
<dt>XXX</dt><dd> set <var>Level</var> to <var>XXX</var>, the protocol number of the protocol
1296
 
which should interprete the option. </dd>
1297
 
</dl>
1298
 
<p>
1299
 
For more information on this call, refer to the unix manual page
1300
 
<file>setsockopt</file>
1301
 
</p>
1302
 
</descr>
1303
 
<errors>
1304
 
<p>
1305
 
Errors are reported in <var>SocketError</var>, and include the following:
1306
 
</p>
1307
 
<dl>
1308
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1309
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1310
 
<dt>SYS_EFAULT</dt><dd> <var>OptVal</var> points outside your address space.</dd>
1311
 
</dl>
1312
 
</errors>
1313
 
<seealso>
1314
 
<link id="GetSocketOptions"/>
1315
 
</seealso>
1316
 
</element>
1317
 
 
1318
 
<element name="Shutdown">
1319
 
<short>Close one end of full duplex connection.</short>
1320
 
<descr>
1321
 
<p>
1322
 
<var>ShutDown</var> closes one end of a full duplex socket connection, described
1323
 
by <var>Sock</var>. The parameter <var>How</var> determines how the connection 
1324
 
will be shut down, and can be one of the following:
1325
 
</p>
1326
 
<dl>
1327
 
<dt>0</dt><dd>Further receives are disallowed.</dd>
1328
 
<dt>1</dt><dd>Further sends are disallowed.</dd>
1329
 
<dt>2</dt><dd>Sending nor receiving are allowed.</dd>
1330
 
</dl>
1331
 
<p>
1332
 
On succes, the function returns 0, on error -1 is returned.
1333
 
</p>
1334
 
</descr>
1335
 
<errors>
1336
 
<p>
1337
 
<var>SocketError</var> is used to report errors, and includes the following:
1338
 
</p>
1339
 
<dl>
1340
 
<dt>SYS_EBADF</dt><dd> The socket descriptor is invalid.</dd>
1341
 
<dt>SYS_ENOTCONN</dt><dd> The socket isn't connected.</dd>
1342
 
<dt>SYS_ENOTSOCK</dt><dd> The descriptor is not a socket.</dd>
1343
 
</dl>
1344
 
</errors>
1345
 
<seealso>
1346
 
<link id="Socket"/>
1347
 
<link id="Connect"/>
1348
 
</seealso>
1349
 
</element>
1350
 
 
1351
 
<element name="Sock2File">
1352
 
<short>Convert socket to untyped file descriptors</short>
1353
 
<descr>
1354
 
<var>Sock2File</var> transforms a socket <var>Sock</var> into 2 Pascal file
1355
 
descriptors of type <var>File</var>, one for reading from the socket
1356
 
(<var>SockIn</var>), one for writing to the socket (<var>SockOut</var>).
1357
 
</descr>
1358
 
<errors>
1359
 
None.
1360
 
</errors>
1361
 
<seealso>
1362
 
<link id="Socket"/>
1363
 
<link id="Sock2Text"/>
1364
 
</seealso>
1365
 
</element>
1366
 
 
1367
 
<element name="Sock2Text">
1368
 
<short>Convert socket to text file descriptors</short>
1369
 
<descr>
1370
 
<var>Sock2Text</var> transforms a socket <var>Sock</var> into 2 Pascal file
1371
 
descriptors of type <var>Text</var>, one for reading from the socket
1372
 
(<var>SockIn</var>), one for writing to the socket (<var>SockOut</var>).
1373
 
</descr>
1374
 
<errors>
1375
 
None.
1376
 
</errors>
1377
 
<seealso>
1378
 
<link id="Socket"/>
1379
 
<link id="Sock2File"/>
1380
 
</seealso>
1381
 
</element>
1382
 
 
1383
 
<element name="Socket">
1384
 
<short>Create new socket</short>
1385
 
<descr>
1386
 
<p>
1387
 
<var>Socket</var> creates a new socket in domain <var>Domain</var>, from type
1388
 
<var>SocketType</var> using protocol <var>Protocol</var>.
1389
 
The Domain, Socket type and Protocol can be specified using predefined
1390
 
constants (see the section on constants for available constants)
1391
 
If succesfull, the function returns a socket descriptor, which can be passed
1392
 
to a subsequent <link id="Bind"/> call. If unsuccesfull, the function returns -1.
1393
 
</p>
1394
 
<p>
1395
 
for an example, see <link id="Accept"/>.
1396
 
</p>
1397
 
</descr>
1398
 
<errors>
1399
 
<p>
1400
 
Errors are returned in <var>SocketError</var>, and include the follwing:
1401
 
</p>
1402
 
<dl>
1403
 
<dt>SYS_EPROTONOSUPPORT</dt><dd> The protocol type or the specified protocol is not
1404
 
supported within this domain.</dd>
1405
 
<dt>SYS_EMFILE</dt><dd>The per-process descriptor table is full.</dd>
1406
 
<dt>SYS_ENFILE</dt><dd>The system file table is full.</dd>
1407
 
<dt>SYS_EACCESS</dt><dd> Permission to create a socket of the specified type 
1408
 
and/or protocol is denied.</dd>
1409
 
<dt>SYS_ENOBUFS</dt><dd>Insufficient buffer space is available. The socket
1410
 
cannot be created until sufficient resources are freed.</dd>
1411
 
</dl>
1412
 
</errors>
1413
 
<seealso>
1414
 
<link id="SocketPair"/>, \seem{socket}{2}
1415
 
</seealso>
1416
 
</element>
1417
 
 
1418
 
 
1419
 
<element name="SocketPair">
1420
 
<short>Create socket pair</short>
1421
 
<descr>
1422
 
<var>SocketPair</var> creates 2 sockets in domain <var>Domain</var>, from type
1423
 
<var>SocketType</var> and using protocol <var>Protocol</var>.
1424
 
The pair is returned in <var>Pair</var>, and they are indistinguishable.
1425
 
The function returns -1 upon error and 0 upon success.
1426
 
</descr>
1427
 
<errors>
1428
 
Errors are reported in <var>SocketError</var>, and are the same as in <link id="Socket"/>
1429
 
</errors>
1430
 
<seealso>
1431
 
<link id="Str2UnixSockAddr"/>
1432
 
</seealso>
1433
 
</element>
1434
 
 
1435
 
<element name="Str2UnixSockAddr">
1436
 
<short>Convert path to <link id="TUnixSockAddr"/></short>
1437
 
<descr>
1438
 
<var>Str2UnixSockAddr</var> transforms a Unix socket address in a string to a
1439
 
<var>TUnixSockAddr</var> structure which can be passed to the <link id="Bind"/> call.
1440
 
</descr>
1441
 
<errors>
1442
 
None.
1443
 
</errors>
1444
 
<seealso>
1445
 
<link id="Socket"/>
1446
 
<link id="Bind"/>
1447
 
</seealso>
1448
 
</element>
1449
 
 
1450
 
<element name="htonl">
1451
 
<short>Convert long integer from host ordered to network ordered</short>
1452
 
<descr>
1453
 
<var>htonl</var> makes sure that the bytes in <var>host</var> are ordered
1454
 
in the correct way for sending over the network and returns the correctly
1455
 
ordered result.
1456
 
</descr>
1457
 
<seealso>
1458
 
<link id="htons"/>
1459
 
<link id="ntohl"/>
1460
 
<link id="ntohs"/>
1461
 
</seealso>
1462
 
</element>
1463
 
 
1464
 
<element name="htons">
1465
 
<short>Convert short integer from host ordered to network ordered</short>
1466
 
<descr>
1467
 
<var>htons</var> makes sure that the bytes in <var>host</var> are  ordered
1468
 
in the correct way for sending over the network and returns the correctly
1469
 
ordered result.
1470
 
</descr>
1471
 
<seealso>
1472
 
<link id="htonl"/>
1473
 
<link id="ntohl"/>
1474
 
<link id="ntohs"/>
1475
 
</seealso>
1476
 
</element>
1477
 
 
1478
 
<element name="ntohl">
1479
 
<short>Convert long integer from network ordered to host ordered</short>
1480
 
<descr>
1481
 
<var>ntohs</var> makes sure that the bytes in <var>Net</var>, received from
1482
 
the network, are ordered in the correct way for handling by the host
1483
 
machinen, and returns the correctly ordered result.
1484
 
</descr>
1485
 
<seealso>
1486
 
<link id="htonl"/>
1487
 
<link id="htons"/>
1488
 
<link id="ntohs"/>
1489
 
</seealso>
1490
 
</element>
1491
 
 
1492
 
<element name="ntohs">
1493
 
<short>Convert short integer from network ordered to host ordered</short>
1494
 
<descr>
1495
 
<var>ntohs</var> makes sure that the bytes in <var>Net</var>, received from
1496
 
the network, are ordered in the correct way for handling by the host
1497
 
machinen, and returns the correctly ordered result.
1498
 
</descr>
1499
 
<seealso>
1500
 
<link id="htonl"/>
1501
 
<link id="htons"/>
1502
 
<link id="ntohl"/>
1503
 
</seealso>
1504
 
</element>
1505
 
 
1506
 
<!-- unresolved type reference Visibility: default -->
1507
 
<element name="UnixType">
1508
 
<short>Basic Unix types</short>
1509
 
<descr>
1510
 
</descr>
1511
 
<seealso>
1512
 
</seealso>
1513
 
</element>
1514
 
 
1515
 
<!-- alias type Visibility: default -->
1516
 
<element name="TIn_addr">
1517
 
<short>Alias for <link id="#rtl.sockets.In_addr">in_addr</link> record type.</short>
1518
 
</element>
1519
 
 
1520
 
<!-- pointer type Visibility: default -->
1521
 
<element name="pin_addr">
1522
 
<short>Pointer to <link id="#rtl.sockets.In_addr">in_addr</link> record.</short>
1523
 
</element>
1524
 
 
1525
 
<!-- alias type Visibility: default -->
1526
 
<element name="TInAddr">
1527
 
<short>Alias for <link id="#rtl.sockets.In_addr">in_addr</link> record type.</short>
1528
 
</element>
1529
 
 
1530
 
<!-- array type Visibility: default -->
1531
 
<element name="in_addrbytes">
1532
 
<short>Array with same length as <link id="#rtl.sockets.In_addr">in_addr</link> record</short>
1533
 
<descr>
1534
 
<var>in_addrbytes</var> is used to typecast a <link id="in_addr"/> record to
1535
 
an array of bytes.
1536
 
</descr>
1537
 
</element>
1538
 
 
1539
 
<!-- alias type Visibility: default -->
1540
 
<element name="Sockaddr">
1541
 
<short>Alias for <link id="#rtl.sockets.TSockAddr">TSockAddr</link> record type.</short>
1542
 
</element>
1543
 
 
1544
 
<!-- function Visibility: default -->
1545
 
<element name="NetAddrToStr">
1546
 
<short>Convert a network address to a string.</short>
1547
 
<descr>
1548
 
<var>NetAddrToStr</var> converts the network address in <var>Entry</var> to
1549
 
a string representation in human-readable form (a dotted quad).
1550
 
</descr>
1551
 
<seealso>
1552
 
<link id="HostAddrToStr"/>
1553
 
<link id="StrToNetAddr"/>
1554
 
<link id="StrToHostAddr"/>
1555
 
</seealso>
1556
 
</element>
1557
 
 
1558
 
<!-- function Visibility: default -->
1559
 
<element name="HostAddrToStr">
1560
 
<short>Convert a host address to a string.</short>
1561
 
<descr>
1562
 
<p>
1563
 
<var>HostAddrToStr</var> converts the host address in <var>Entry</var> to
1564
 
a string representation in human-readable form (a dotted quad).
1565
 
</p>
1566
 
<p>
1567
 
Basically, it is the same as <link id="NetAddrToStr"/>, but with the bytes
1568
 
in correct order.
1569
 
</p>
1570
 
</descr>
1571
 
<seealso>
1572
 
<link id="NetAddrToStr"/>
1573
 
<link id="StrToHostAddr"/>
1574
 
<link id="StrToNetAddr"/>
1575
 
</seealso>
1576
 
</element>
1577
 
 
1578
 
<!-- function Visibility: default -->
1579
 
<element name="StrToHostAddr">
1580
 
<short>Convert a string to a host address.</short>
1581
 
<descr>
1582
 
<var>StrToHostAddr</var> converts the string representation in <var>IP</var>
1583
 
to a host address and returns the host address. 
1584
 
</descr>
1585
 
<errors>
1586
 
On error, the host address is filled with zeroes.
1587
 
</errors>
1588
 
<seealso>
1589
 
<link id="NetAddrToStr"/>
1590
 
<link id="HostAddrToStr"/>
1591
 
<link id="StrToNetAddr"/>
1592
 
</seealso>
1593
 
</element>
1594
 
 
1595
 
<!-- function Visibility: default -->
1596
 
<element name="StrToNetAddr">
1597
 
<short>Convert a string to a network address.</short>
1598
 
<descr>
1599
 
<var>StrToNetAddr</var> converts the string representation in <var>IP</var>
1600
 
to a network address and returns the network address. 
1601
 
</descr>
1602
 
<errors>
1603
 
On error, the network address is filled with zeroes.
1604
 
</errors>
1605
 
<seealso>
1606
 
<link id="NetAddrToStr"/>
1607
 
<link id="HostAddrToStr"/>
1608
 
<link id="StrToHostAddr"/>
1609
 
</seealso>
1610
 
</element>
1611
 
 
1612
 
<!-- function Visibility: default -->
1613
 
<element name="HostToNet">
1614
 
<short>Convert a host address to a network address</short>
1615
 
<descr>
1616
 
<var>HostToNet</var> converts a host address to a network address.
1617
 
It takes care of endianness of the host machine. The address can be
1618
 
specified as a dotted quad or as a longint.
1619
 
</descr>
1620
 
<errors>
1621
 
None.
1622
 
</errors>
1623
 
<seealso>
1624
 
<link id="NetToHost"/>
1625
 
<link id="NToHS"/>
1626
 
<link id="HToNS"/>
1627
 
<link id="ShortHostToNet"/>
1628
 
<link id="ShortNetToHost"/>
1629
 
</seealso>
1630
 
</element>
1631
 
 
1632
 
<!-- function Visibility: default -->
1633
 
<element name="NetToHost">
1634
 
<short>Convert a network address to a host address.</short>
1635
 
<descr>
1636
 
<var>NetToHost</var> converts a network address to a host address. 
1637
 
It takes care of endianness of the host machine. The address can be
1638
 
specified as a dotted quad or as a longint.
1639
 
</descr>
1640
 
<errors>
1641
 
None.
1642
 
</errors>
1643
 
<seealso>
1644
 
<link id="HostToNet"/>
1645
 
<link id="NToHS"/>
1646
 
<link id="HToNS"/>
1647
 
<link id="ShortHostToNet"/>
1648
 
<link id="ShortNetToHost"/>
1649
 
</seealso>
1650
 
</element>
1651
 
 
1652
 
<!-- function Visibility: default -->
1653
 
<element name="ShortHostToNet">
1654
 
<short>Convert a host port number to a network port number</short>
1655
 
<descr>
1656
 
<var>ShortHostToNet</var> converts a host port number to a network port
1657
 
number. It takes care of endianness of the host machine. 
1658
 
</descr>
1659
 
<errors>
1660
 
None.
1661
 
</errors>
1662
 
<seealso>
1663
 
<link id="ShortNetToHost"/>
1664
 
<link id="HostToNet"/>
1665
 
<link id="NToHS"/>
1666
 
<link id="HToNS"/>
1667
 
</seealso>
1668
 
</element>
1669
 
 
1670
 
<!-- function Visibility: default -->
1671
 
<element name="ShortNetToHost">
1672
 
<short>Convert a network port number to a host port number</short>
1673
 
<descr>
1674
 
<var>ShortNetToHost</var> converts a network port number to a host port
1675
 
number. It takes care of endianness of the host machine.
1676
 
</descr>
1677
 
<errors>
1678
 
None.
1679
 
</errors>
1680
 
<seealso>
1681
 
<link id="ShortNetToHost"/>
1682
 
<link id="HostToNet"/>
1683
 
<link id="NToHS"/>
1684
 
<link id="HToNS"/>
1685
 
</seealso>
1686
 
</element>
1687
 
 
1688
 
<!-- function Visibility: default -->
1689
 
<element name="HostAddrToStr6">
1690
 
<short>Convert a IPV6 host address to a string representation.</short>
1691
 
<descr>
1692
 
<p>
1693
 
<var>HostAddrToStr6</var> converts the IPV6 host address in <var>Entry</var> to
1694
 
a string representation in human-readable form.
1695
 
</p>
1696
 
<p>
1697
 
Basically, it is the same as <link id="NetAddrToStr6"/>, but with the bytes
1698
 
in correct order.
1699
 
</p>
1700
 
</descr>
1701
 
<seealso>
1702
 
<link id="NetAddrToStr"/>
1703
 
<link id="StrToHostAddr"/>
1704
 
<link id="StrToNetAddr"/>
1705
 
<link id="StrToHostAddr6"/>
1706
 
</seealso>
1707
 
</element>
1708
 
 
1709
 
<!-- function Visibility: default -->
1710
 
<element name="StrToHostAddr6">
1711
 
<short>Convert a string to a IPV6 host address.</short>
1712
 
<descr>
1713
 
<var>StrToHostAddr6</var> converts the string representation in <var>IP</var>
1714
 
to a IPV6 host address and returns the host address.
1715
 
</descr>
1716
 
<errors>
1717
 
On error, the address is filled with zeroes.
1718
 
</errors>
1719
 
<seealso>
1720
 
<link id="NetAddrToStr6"/>
1721
 
<link id="HostAddrToStr6"/>
1722
 
<link id="StrToHostAddr"/>
1723
 
</seealso>
1724
 
</element>
1725
 
 
1726
 
<!-- function Visibility: default -->
1727
 
<element name="NetAddrToStr6">
1728
 
<short>Convert a IPV6 network address to a string.</short>
1729
 
<descr>
1730
 
<p>
1731
 
<var>NetAddrToStr6</var> converts the IPV6 network address in <var>Entry</var> to
1732
 
a string representation in human-readable form.
1733
 
</p>
1734
 
<p>
1735
 
Basically, it is the same as <link id="NetAddrToStr6"/>, but with the bytes
1736
 
in correct order.
1737
 
</p>
1738
 
</descr>
1739
 
<seealso>
1740
 
<link id="NetAddrToStr"/>
1741
 
<link id="StrToHostAddr"/>
1742
 
<link id="StrToNetAddr"/>
1743
 
<link id="StrToHostAddr6"/>
1744
 
</seealso>
1745
 
</element>
1746
 
 
1747
 
<!-- function Visibility: default -->
1748
 
<element name="StrToNetAddr6">
1749
 
<short>Convert a string to a IPV6 network address</short>
1750
 
<descr>
1751
 
<var>StrToNetAddr6</var> converts the string representation in <var>IP</var>
1752
 
to a IPV6 network address and returns the network address.
1753
 
</descr>
1754
 
<errors>
1755
 
On error, the address is filled with zeroes.
1756
 
</errors>
1757
 
<seealso>
1758
 
<link id="NetAddrToStr6"/>
1759
 
<link id="HostAddrToStr6"/>
1760
 
<link id="StrToHostAddr6"/>
1761
 
</seealso>
1762
 
</element>
1763
 
 
1764
 
<!-- constant Visibility: default -->
1765
 
<element name="NoAddress">
1766
 
<short>Constant indicating invalid (no) network address.</short>
1767
 
</element>
1768
 
 
1769
 
<!-- constant Visibility: default -->
1770
 
<element name="NoNet">
1771
 
<short>Constant indicating invalid (no) network address.</short>
1772
 
</element>
1773
 
 
1774
 
<!-- constant Visibility: default -->
1775
 
<element name="NoAddress6">
1776
 
<short>Constant indicating invalid (no) IPV6 network address.</short>
1777
 
</element>
1778
 
 
1779
 
<!-- constant Visibility: default -->
1780
 
<element name="NoNet6">
1781
 
<short>Constant indicating invalid (no) IPV6 network address.</short>
1782
 
</element>
1783
 
 
1784
 
</module>
1785
 
</package>
1786
 
</fpdoc-descriptions>
 
 
b'\\ No newline at end of file'