Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Improve descripton for [chan configure … -sockname] according to server socket parameters

Open6ea66b3b19e055fde7a1a584bef7095308864af9Created 8 years agoUpdated 8 years ago
Descriptionplain2019-05-05 17:38:18
I have tried the following command out for the software “TCL 8.6.9-1.5” on an openSUSE system.

% set target [chan configure [set so [socket -server handle_input -myaddr localhost 0]] -sockname]
127.0.0.1 localhost 45833 ::1 localhost 45833


Now I wonder how parts of the shown data fit to the following wording from the documentation.
https://www.tcl.tk/man/tcl/TclCmd/socket.htm#M13
“…
For server sockets this option returns a list of a multiple of three elements each group of which have the same meaning as described above. The list contains more than one group when the server socket was created … with the argument to -myaddr being a domain name that resolves multiple IP addresses that are local to the invoking host.
…”


Should any higher level functions be used to extract meaningful connection parameters in a safe way here?
dgpplain2019-05-06 15:07:38
strip bad unicode from title to stop noisy chat alerts.
Log in (anonymous is fine) to add a comment.