def connection(name, &block)
      # Camelize class name
      class_name = name.to_s.split('_').map { |s| s.capitalize }.join

      connection = Class.new Cool.io::TCPSocket
      connection_builder = ConnectionBuilder.new connection
      connection_builder.instance_eval(&block)

      Coolio::Connections.const_set class_name, connection
    end
def connection(name, &block)
      # Camelize class name
      class_name = name.to_s.split('_').map { |s| s.capitalize }.join

      connection = Class.new Cool.io::TCPSocket
      connection_builder = ConnectionBuilder.new connection
      connection_builder.instance_eval(&block)

      Coolio::Connections.const_set class_name, connection
    end
Create a new Cool.io::TCPSocket class