Class: HrrRbSftp::Sender
- Inherits:
-
Object
- Object
- HrrRbSftp::Sender
- Defined in:
- lib/hrr_rb_sftp/sender.rb
Instance Method Summary collapse
-
#initialize(io_out) ⇒ Sender
constructor
A new instance of Sender.
- #send(payload) ⇒ Object
Constructor Details
#initialize(io_out) ⇒ Sender
Returns a new instance of Sender.
3 4 5 |
# File 'lib/hrr_rb_sftp/sender.rb', line 3 def initialize io_out @io_out = io_out end |
Instance Method Details
#send(payload) ⇒ Object
7 8 9 10 11 |
# File 'lib/hrr_rb_sftp/sender.rb', line 7 def send payload @io_out.write(Protocol::Common::DataType::Uint32.encode(payload.length)) @io_out.write(payload) @io_out.flush end |