Class: Ignis::Collective::Transport::RIOSocket
- Inherits:
-
Object
- Object
- Ignis::Collective::Transport::RIOSocket
- Defined in:
- lib/nvruby/collective/transport/rio_transport.rb
Overview
RIO Socket wrapper
Instance Attribute Summary collapse
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
Instance Method Summary collapse
- #bind(addr, port) ⇒ Object
- #close ⇒ Object
- #closed? ⇒ Boolean
- #connect(addr, port) ⇒ Object
-
#initialize(family:, type:, protocol:) ⇒ RIOSocket
constructor
A new instance of RIOSocket.
Constructor Details
#initialize(family:, type:, protocol:) ⇒ RIOSocket
Returns a new instance of RIOSocket.
377 378 379 380 381 382 383 |
# File 'lib/nvruby/collective/transport/rio_transport.rb', line 377 def initialize(family:, type:, protocol:) @family = family @type = type @protocol = protocol @handle = nil @closed = false end |
Instance Attribute Details
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
375 376 377 |
# File 'lib/nvruby/collective/transport/rio_transport.rb', line 375 def handle @handle end |
Instance Method Details
#bind(addr, port) ⇒ Object
385 386 387 388 |
# File 'lib/nvruby/collective/transport/rio_transport.rb', line 385 def bind(addr, port) @local_addr = addr @local_port = port end |
#close ⇒ Object
395 396 397 |
# File 'lib/nvruby/collective/transport/rio_transport.rb', line 395 def close @closed = true end |
#closed? ⇒ Boolean
399 400 401 |
# File 'lib/nvruby/collective/transport/rio_transport.rb', line 399 def closed? @closed end |
#connect(addr, port) ⇒ Object
390 391 392 393 |
# File 'lib/nvruby/collective/transport/rio_transport.rb', line 390 def connect(addr, port) @remote_addr = addr @remote_port = port end |