Class: Ignis::Collective::Transport::RIOSocket

Inherits:
Object
  • Object
show all
Defined in:
lib/nvruby/collective/transport/rio_transport.rb

Overview

RIO Socket wrapper

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#handleObject (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

#closeObject



395
396
397
# File 'lib/nvruby/collective/transport/rio_transport.rb', line 395

def close
  @closed = true
end

#closed?Boolean

Returns:

  • (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