# File lib/eventmachine.rb, line 689
689:         def EventMachine::connect_unix_domain socketname, handler=nil, *args
690:                 klass = if (handler and handler.is_a?(Class))
691:                         handler
692:                 else
693:                         Class.new( Connection ) {handler and include handler}
694:                 end
695: 
696:     arity = klass.instance_method(:initialize).arity
697:     expected = arity >= 0 ? arity : -(arity + 1)
698:     if (arity >= 0 and args.size != expected) or (arity < 0 and args.size < expected)
699:       raise ArgumentError, "wrong number of arguments for #{klass}#initialize (#{args.size} for #{expected})"
700:     end
701: 
702:                 s = connect_unix_server socketname
703:                 c = klass.new s, *args
704:                 @conns[s] = c
705:                 block_given? and yield c
706:                 c
707:         end