summaryrefslogtreecommitdiff
path: root/lib/custodian/protocoltest/tcp.rb
diff options
context:
space:
mode:
authorSteve Kemp <steve@steve.org.uk>2012-11-21 21:07:57 +0000
committerSteve Kemp <steve@steve.org.uk>2012-11-21 21:07:57 +0000
commit62205ccb8e178b15cf8a8b34c4011de3c6682433 (patch)
tree29113400a2c460c3ce57e28b74f9ce410759f6cb /lib/custodian/protocoltest/tcp.rb
parentb99ad925774f39a4d303c4ae9a69ee18740f2303 (diff)
whitespace & comment update.
Diffstat (limited to 'lib/custodian/protocoltest/tcp.rb')
-rw-r--r--lib/custodian/protocoltest/tcp.rb18
1 files changed, 17 insertions, 1 deletions
diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb
index 115bf6a..9e141fe 100644
--- a/lib/custodian/protocoltest/tcp.rb
+++ b/lib/custodian/protocoltest/tcp.rb
@@ -84,6 +84,8 @@ class TCPTest < ProtocolTest
end
+
+
#
# Run the TCP-protocol test.
#
@@ -96,10 +98,16 @@ class TCPTest < ProtocolTest
end
+
+
#
+ # Run the connection test - optionally matching against the banner.
#
+ # If the banner is nil then we're merely testing we can connect and
+ # send the string "quit".
#
- def run_test_internal( host, port, banner )
+ #
+ def run_test_internal( host, port, banner = nil )
begin
timeout(30) do
begin
@@ -141,6 +149,8 @@ class TCPTest < ProtocolTest
end
+
+
#
# If the test fails then report the error.
#
@@ -148,6 +158,12 @@ class TCPTest < ProtocolTest
@error
end
+
+
+
register_test_type "tcp"
+
+
+
end