Google

# File jabber4r/session.rb, line 138

    def Session.bind(jid, password, port=5222, digest=false)

      jid = Jabber::JID.new(jid) if jid.kind_of? String

      session = Session.new(jid.host, port)

      raise "Authentication failed" unless session.authenticate(jid.node, password, jid.resource, digest)

      session.request_roster

      session.register_message_filter

      session.register_presence_filter

      session.register_iq_filter

      session.announce_initial_presence

      session

    end