<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          XMPP4RXMPP/Jabber的Ruby類庫

          聯(lián)合創(chuàng)作 · 2023-09-29 10:58

          XMPP4R是一個(gè)XMPP/Jabber的Ruby類庫。它的目標(biāo)是提供開發(fā)Jabber相關(guān)應(yīng)用程序或者Ruby腳本的完整框架。

          安裝方法:gem install xmpp4r

          示例代碼:

            # Send a message to a friend, asking for authorization if necessary:
          im = Jabber::Simple.new("[email protected]", "password")
          im.deliver("[email protected]", "Hey there friend!")

          # Get received messages and print them out to the console:
          im.received_messages { |msg| puts msg.body if msg.type == :chat }

          # Send an authorization request to a user:
          im.add("[email protected]")

          # Get presence updates from your friends, and print them out to the console:
          # (admittedly, this one needs some work)
          im.presence_updates { |update|
          from = update[0].jid.strip.to_s
          status = update[2].status
          presence = update[2].show
          puts "#{from} went #{presence}: #{status}"
          end

          # Remove a user from your contact list:
          im.remove("[email protected]")

          # See the Jabber::Simple documentation for more information.
          瀏覽 17
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  国产一级操逼视频 | 性视频无码 | YoUJizz日本55丰满熟妇 | 麻豆成人影音 | 黄片成人在线观看 |