Class: Spring::WorkerChannel

Inherits:
Object
  • Object
show all
Defined in:
lib/spring-jruby/io_helpers.rb,
lib/spring-jruby/io_helpers.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ WorkerChannel

Returns a new instance of WorkerChannel.



41
42
43
# File 'lib/spring-jruby/io_helpers.rb', line 41

def initialize(socket)
  @to_io = socket
end

Instance Attribute Details

#to_ioObject (readonly)

Returns the value of attribute to_io.



39
40
41
# File 'lib/spring-jruby/io_helpers.rb', line 39

def to_io
  @to_io
end

Class Method Details

.pairObject



30
31
32
33
# File 'lib/spring-jruby/io_helpers.rb', line 30

def self.pair
  a, b = UNIXSocket.pair
  [new(a), IOWrapper.new(b)]
end

.remote_endpointObject



35
36
37
# File 'lib/spring-jruby/io_helpers.rb', line 35

def self.remote_endpoint
  UNIXSocket.for_fd(3)
end