class Netconf::IOProc
Constants
- DEFAULT_RDBLKSZ
Attributes
args[R]
Public Class Methods
new( args_h = {}, &block )
click to toggle source
Calls superclass method
Netconf::Transport::new
# File lib/net/netconf/ioproc.rb, line 9 def initialize( args_h = {}, &block ) os_type = args_h[:os_type] || Netconf::DEFAULT_OS_TYPE @args = args_h.clone # an OS specific implementation must exist to support this transport type extend Netconf::const_get( os_type )::IOProc @trans_timeout = @args[:timeout] || Netconf::DEFAULT_TIMEOUT @trans_waitio = @args[:waitio] || Netconf::DEFAULT_WAITIO super( &block ) end
Public Instance Methods
puts( str = nil )
click to toggle source
# File lib/net/netconf/ioproc.rb, line 49 def puts( str = nil ) @trans.puts( str ) end
trans_close()
click to toggle source
# File lib/net/netconf/ioproc.rb, line 36 def trans_close @trans.write Netconf::RPC::MSG_CLOSE_SESSION @trans.close end
trans_open() { |self| ... }
click to toggle source
the OS specific transport must implement this method
# File lib/net/netconf/ioproc.rb, line 24 def trans_open # :yield: self raise "Unsupported IOProc" end
trans_receive()
click to toggle source
# File lib/net/netconf/ioproc.rb, line 45 def trans_receive Netconf.trans_receive end
trans_receive_hello()
click to toggle source
# File lib/net/netconf/ioproc.rb, line 28 def trans_receive_hello trans_receive() end
trans_send( cmd_str )
click to toggle source
# File lib/net/netconf/ioproc.rb, line 41 def trans_send( cmd_str ) @trans.write( cmd_str ) end
trans_send_hello()
click to toggle source
# File lib/net/netconf/ioproc.rb, line 32 def trans_send_hello nil end
waitfor( on_re )
click to toggle source
# File lib/net/netconf/ioproc.rb, line 53 def waitfor( on_re ) Netconf.waitfor(on_re) end