class EventMachine::EvmaUNIXClient
@private
Public Class Methods
connect(chain)
click to toggle source
# File lib/em/pure_ruby.rb, line 995 def self.connect chain sd = Socket.new( Socket::AF_LOCAL, Socket::SOCK_STREAM, 0 ) begin # TODO, this assumes a current Ruby snapshot. # We need to degrade to a nonblocking connect otherwise. sd.connect_nonblock( Socket.pack_sockaddr_un( chain )) rescue Errno::EINPROGRESS end EvmaUNIXClient.new sd end
new(io)
click to toggle source
Calls superclass method
EventMachine::StreamObject::new
# File lib/em/pure_ruby.rb, line 1007 def initialize io super @pending = true end
Public Instance Methods
eventable_write()
click to toggle source
Calls superclass method
EventMachine::StreamObject#eventable_write
# File lib/em/pure_ruby.rb, line 1021 def eventable_write if @pending @pending = false if 0 == io.getsockopt(Socket::SOL_SOCKET, Socket::SO_ERROR).unpack("i").first EventMachine::event_callback uuid, ConnectionCompleted, "" end else super end end
select_for_reading?()
click to toggle source
Calls superclass method
EventMachine::StreamObject#select_for_reading?
# File lib/em/pure_ruby.rb, line 1017 def select_for_reading? @pending ? false : super end
select_for_writing?()
click to toggle source
Calls superclass method
EventMachine::StreamObject#select_for_writing?
# File lib/em/pure_ruby.rb, line 1013 def select_for_writing? @pending ? true : super end