@private
# File lib/em/pure_ruby.rb, line 647 def self.connect bind_addr, bind_port, host, port sd = Socket.new( Socket::AF_INET, Socket::SOCK_STREAM, 0 ) sd.bind( Socket.pack_sockaddr_in( bind_port, bind_addr )) if bind_addr begin # TODO, this assumes a current Ruby snapshot. # We need to degrade to a nonblocking connect otherwise. sd.connect_nonblock( Socket.pack_sockaddr_in( port, host )) rescue Errno::EINPROGRESS end EvmaTCPClient.new sd end
# File lib/em/pure_ruby.rb, line 675 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
Generated with the Darkfish Rdoc Generator 2.