Add -P source port option to connect

git-svn-id: file:///home/svn/framework3/trunk@6184 4d416f70-5f16-0410-b530-b9f4589650da
unstable
kris 2009-01-26 03:06:58 +00:00
parent b321790c04
commit 13cc54cbe5
1 changed files with 9 additions and 3 deletions

View File

@ -45,6 +45,7 @@ class Core
"-C" => [ false, "Try to use CRLF for EOL sequence." ],
"-c" => [ true, "Specify which Comm to use." ],
"-i" => [ true, "Send the contents of a file." ],
"-P" => [ true, "Specify source port." ],
"-S" => [ true, "Specify source address." ],
"-s" => [ false, "Connect with SSL." ],
"-w" => [ true, "Specify connect timeout." ])
@ -197,7 +198,8 @@ class Core
commval = nil
fileval = nil
proxies = nil
source = nil
srcaddr = nil
srcport = nil
ssl = false
cto = nil
aidx = 0
@ -213,11 +215,14 @@ class Core
when "-i"
fileval = val
aidx = idx + 2
when "-P"
srcport = val
aidx = idx + 2
when "-p"
proxies = val
aidx = idx + 2
when "-S"
source = val
srcaddr = val
aidx = idx + 2
when "-s"
ssl = true
@ -281,7 +286,8 @@ class Core
'SSL' => ssl,
'PeerHost' => host,
'PeerPort' => port,
'LocalHost' => source,
'LocalHost' => srcaddr,
'LocalPort' => srcport,
'Timeout' => cto
})
rescue