Class: FtpProxy::ActiveRelay
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(srv, right) ⇒ ActiveRelay
constructor
A new instance of ActiveRelay.
- #relay ⇒ Object
Constructor Details
#initialize(srv, right) ⇒ ActiveRelay
Returns a new instance of ActiveRelay.
32 33 34 35 |
# File 'lib/ftpproxy.rb', line 32 def initialize srv, right @srv = srv super nil, right end |
Instance Method Details
#close ⇒ Object
44 45 46 47 |
# File 'lib/ftpproxy.rb', line 44 def close @srv.close if !@srv.closed? super end |
#relay ⇒ Object
37 38 39 40 41 42 |
# File 'lib/ftpproxy.rb', line 37 def relay raise 'timeout waiting for connection' unless IO.select [@srv], nil, nil, 60000 @left = @srv.accept @srv.close super end |