Tcl UDP

Check-in [85598020ca]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Clarified the keywords in the manual a bit.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 85598020cadc4223732422fcece44f34983da20e
User & Date: huubeikens 2014-02-22 21:06:40
Context
2014-03-02
07:22
Solved bug; crash when assigning and ipv4 group to an ipv6 socket check-in: 229382a356 user: huubeikens tags: trunk, ver_10_0_9
2014-02-22
21:06
Clarified the keywords in the manual a bit. check-in: 85598020ca user: huubeikens tags: trunk
2014-02-14
07:35
Updated the changelog. check-in: 60bd166dc5 user: huubeikens tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/udp.man.

19
20
21
22
23
24
25
26
27
28
29

30
31
32





33



34


35
36
37
38
39
40
41
[section "COMMANDS"]

[list_begin definitions]

[call [cmd "udp_open"] [opt "[arg port]"] [opt "[arg reuse]"] [opt "[arg ipv6]"]]

[cmd udp_open] will open a UDP socket. If [arg port] is specified the UDP
socket will be opened on that port. Otherwise the system will choose a port
and the user can use the [cmd udp_conf] command to obtain the port number
if required.

[nl]
Additional argument may be provided. If [arg reuse] is specified the 
SO_REUSEADDR socket option is set which permits multiple sockets to 





be bound to the same address/port combination. By default a IPv4 socket is created. When [arg ipv6] is specified an IPv6



socket is created. 



[call [cmd "udp_conf"] [arg "sock"] [arg "host"] [arg "port"]]

[emph Deprecated] in favour of the standard Tcl [cmd fconfigure] command.
[nl]
[cmd udp_conf] in this configuration is used to specify the remote destination
for packets written to this [arg "sock"]. You must call this command before






|



>

<
|
>
>
>
>
>
|
>
>
>
|
>
>







19
20
21
22
23
24
25
26
27
28
29
30
31

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
[section "COMMANDS"]

[list_begin definitions]

[call [cmd "udp_open"] [opt "[arg port]"] [opt "[arg reuse]"] [opt "[arg ipv6]"]]

[cmd udp_open] will open a UDP socket. If a [arg port] is specified the UDP
socket will be opened on that port. Otherwise the system will choose a port
and the user can use the [cmd udp_conf] command to obtain the port number
if required.

[nl]

The following keywords can be used to specify options on the opened socket.

[list_begin definitions]

[lst_item "[arg reuse]"]
Using this keyword sets the SO_REUSEADDR socket option which permits multiple sockets to 
be bound to the same address/port combination.

[lst_item "[arg ipv6]"]
By default a IPv4 socket is created. When keyword [arg ipv6] is specified an IPv6
socket is opened. 

[list_end]

[call [cmd "udp_conf"] [arg "sock"] [arg "host"] [arg "port"]]

[emph Deprecated] in favour of the standard Tcl [cmd fconfigure] command.
[nl]
[cmd udp_conf] in this configuration is used to specify the remote destination
for packets written to this [arg "sock"]. You must call this command before

Changes to doc/udp.n.

59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
...
266
267
268
269
270
271
272
273
274



275



276

277
278
279
280
281
282
283
'\"	option's name as specified in the class command, dbName gives
'\"	the option's name in the option database, and dbClass gives
'\"	the option's class in the option database.
'\"
'\" .UL arg1 arg2
'\"	Print arg1 underlined, then print arg2 normally.
'\"
'\" RCS: @(#) $Id: udp.n,v 1.7 2014/02/14 07:26:57 huubeikens Exp $
'\"
'\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
'\"	# Start an argument description
.de AP
................................................................................
.TP
\fBudp_open\fR ?\fIport\fR? ?\fIreuse\fR? ?\fIipv6\fR?
\fBudp_open\fR will open a UDP socket. If \fIport\fR is specified the UDP
socket will be opened on that port. Otherwise the system will choose a port
and the user can use the \fBudp_conf\fR command to obtain the port number
if required.
.sp
Additional argument may be provided. If \fIreuse\fR is specified the
SO_REUSEADDR socket option is set which permits multiple sockets to



be bound to the same address/port combination. By default a IPv4 socket is created. When \fIipv6\fR is specified an IPv6



socket is created.

.TP
\fBudp_conf\fR \fIsock\fR \fIhost\fR \fIport\fR
\fIDeprecated\fR in favour of the standard Tcl \fBfconfigure\fR command.
.sp
\fBudp_conf\fR in this configuration is used to specify the remote destination
for packets written to this \fIsock\fR. You must call this command before
writing data to the UDP socket.






|







 







|
|
>
>
>
|
>
>
>
|
>







59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
'\"	option's name as specified in the class command, dbName gives
'\"	the option's name in the option database, and dbClass gives
'\"	the option's class in the option database.
'\"
'\" .UL arg1 arg2
'\"	Print arg1 underlined, then print arg2 normally.
'\"
'\" RCS: @(#) $Id: udp.n,v 1.8 2014/02/22 21:06:40 huubeikens Exp $
'\"
'\"	# Set up traps and other miscellaneous stuff for Tcl/Tk man pages.
.if t .wh -1.3i ^B
.nr ^l \n(.l
.ad b
'\"	# Start an argument description
.de AP
................................................................................
.TP
\fBudp_open\fR ?\fIport\fR? ?\fIreuse\fR? ?\fIipv6\fR?
\fBudp_open\fR will open a UDP socket. If \fIport\fR is specified the UDP
socket will be opened on that port. Otherwise the system will choose a port
and the user can use the \fBudp_conf\fR command to obtain the port number
if required.
.sp
The following keywords can be used to specify options on the opened socket.
.RS
.TP
\fIreuse\fR
Using this keyword sets the SO_REUSEADDR socket option which permits multiple sockets to
be bound to the same address/port combination.
.TP
\fIipv6\fR
By default a IPv4 socket is created. When keyword \fIipv6\fR is specified an IPv6
socket is opened.
.RE
.TP
\fBudp_conf\fR \fIsock\fR \fIhost\fR \fIport\fR
\fIDeprecated\fR in favour of the standard Tcl \fBfconfigure\fR command.
.sp
\fBudp_conf\fR in this configuration is used to specify the remote destination
for packets written to this \fIsock\fR. You must call this command before
writing data to the UDP socket.