aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net/protocol.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/protocol.rb')
-rw-r--r--lib/net/protocol.rb18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb
index 399b2bbdd4..c52b9d5184 100644
--- a/lib/net/protocol.rb
+++ b/lib/net/protocol.rb
@@ -30,17 +30,15 @@ Object
: new( address = 'localhost', port = nil )
This method Creates a new protocol object.
-: start( address = 'localhost', port = nil, *args )
-: start( address = 'localhost', port = nil, *args ){|proto| .... }
- This method creates a new Protocol object and start session.
- If you call this method with block, Protocol object give itself
- to block and finish session when block returns.
+: start( address = 'localhost', port = nil, *protoargs )
+: start( address = 'localhost', port = nil, *protoargs ) {|proto| .... }
+ This method creates a new Protocol object and opens a session.
+ equals to Net::Protocol.new( address, port ).start( *protoargs )
: Proxy( address, port )
This method creates a proxy class of its protocol.
Arguments are address/port of proxy host.
-
=== Methods
: address
@@ -50,11 +48,15 @@ Object
connecting port number
: start( *args )
- This method start protocol. If you call this method when the protocol
- is already started, this only returns false without doing anything.
+: start( *args ) {|proto| .... }
+ This method starts protocol. If protocol was already started,
+ do nothing and returns false.
'*args' are specified in subclasses.
+ When is called as iterator, gives Protocol object to block and
+ close session when block finished.
+
: finish
This method ends protocol. If you call this method before protocol starts,
it only return false without doing anything.