class Celluloid::IO::UNIXSocket
UNIXSocket with combined blocking and evented support
Public Class Methods
from_ruby_socket(ruby_socket)
click to toggle source
Convert a Ruby UNIXSocket into a Celluloid::IO::UNIXSocket DEPRECATED: to be removed in a future release @deprecated use .new instead
# File lib/celluloid/io/unix_socket.rb, line 15 def self.from_ruby_socket(ruby_socket) new(ruby_socket) end
new(socket_path, &block)
click to toggle source
Open a UNIX connection.
Calls superclass method
Celluloid::IO::Stream.new
# File lib/celluloid/io/unix_socket.rb, line 20 def initialize(socket_path, &block) # Allow users to pass in a Ruby UNIXSocket directly if socket_path.is_a? ::UNIXSocket super(socket_path) return end # FIXME: not doing non-blocking connect if block super ::UNIXSocket.open(socket_path, &block) else super ::UNIXSocket.new(socket_path) end end
open(socket_path, &block)
click to toggle source
Open a UNIX connection.
# File lib/celluloid/io/unix_socket.rb, line 8 def self.open(socket_path, &block) new(socket_path, &block) end