@private
# File lib/em/pure_ruby.rb, line 725 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
# File lib/em/pure_ruby.rb, line 737 def initialize io super @pending = true end
# File lib/em/pure_ruby.rb, line 751 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
# File lib/em/pure_ruby.rb, line 747 def select_for_reading? @pending ? false : super end
# File lib/em/pure_ruby.rb, line 743 def select_for_writing? @pending ? true : super end