This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Old posts that have not been replied to for several years.
l
loze
Post
by loze » Wed Jul 10, 2002 11:32 pm
i open a tcl-socket and i want to kill it. I have try close $sock but that just close the connection and i have try unset sock but it not worked. So my question is how do i kill the socket?!
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Thu Jul 11, 2002 4:26 am
a simple "close <sock-id>" is sufficient.
EG, your socket pointer is located in $sock
close $sock
Doing
unset sock
will only unset the variable sock, and lot close any connection.
It would be wise to use
catch {close $sock}
though