zoukankan      html  css  js  c++  java
  • Unless, of course, something horrible happens such as a network failure,

    /**

     * Just like the sendElement: method above,

     * but allows you to receive a receipt that can later be used to verify the element has been sent.

     * 

     * If you later want to check to see if the element has been sent:

     * 

     * if ([receipt wait:0]) {

     *   // Element has been sent

     * }

     * 

     * If you later want to wait until the element has been sent:

     * 

     * if ([receipt wait:-1]) {

     *   // Element was sent

     * } else {

     *   // Element failed to send due to disconnection

     * }

     * 

     * It is important to understand what it means when [receipt wait:timeout] returns YES.

     * It does NOT mean the server has received the element.

     * It only means the data has been queued for sending in the underlying OS socket buffer.

     * 

     * So at this point the OS will do everything in its capacity to send the data to the server,

     * which generally means the server will eventually receive the data.

     * Unless, of course, something horrible happens such as a network failure,

     * or a system crash, or the server crashes, etc.

     * 

     * Even if you close the xmpp stream after this point, the OS will still do everything it can to send the data.

    **/

    - (void)sendElement:(NSXMLElement *)element andGetReceipt:(XMPPElementReceipt **)receiptPtr;

  • 相关阅读:
    PAT 甲级 1132 Cut Integer (20 分)
    AcWing 7.混合背包问题
    AcWing 9. 分组背包问题
    AcWing 5. 多重背包问题 II
    AcWing 3. 完全背包问题
    AcWing 4. 多重背包问题
    AcWing 2. 01背包问题
    AcWing 875. 快速幂
    AcWing 874. 筛法求欧拉函数
    AcWing 873. 欧拉函数
  • 原文地址:https://www.cnblogs.com/guligei/p/3510414.html
Copyright © 2011-2022 走看看