Permalink
Browse files

Shortening handling of hostnames in FormatAddress to a single "binary…

…" command.
  • Loading branch information...
1 parent af4301f commit e961149452c63a27c02220bbdd7bbd086661a599 @dongola7 committed Oct 16, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 socks5.tcl
View
@@ -129,9 +129,7 @@ proc ::socks5::FormatAddress {host port} {
return -code -1 "host must be 255 characters or less"
}
- set result [binary format H2c 03 [string length $host]]
- append result $host
- append result [binary format S $port]
+ set result [binary format H2ca*S 03 [string length $host] $host $port]
}
return $result

0 comments on commit e961149

Please sign in to comment.