Class: FtpProxy::ActiveRelay

Inherits:
Relay
  • Object
show all
Defined in:
lib/ftpproxy.rb

Instance Method Summary collapse

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

#closeObject



44
45
46
47
# File 'lib/ftpproxy.rb', line 44

def close
	@srv.close if !@srv.closed?
	super
end

#relayObject



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