zoukankan      html  css  js  c++  java
  • XMPPElementReceipt wait return,

    #pragma mark -

    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

     

    @interface XMPPElementReceipt : NSObject

    {

    uint32_t atomicFlags;

    dispatch_semaphore_t semaphore;

    }

     

    /**

     * Element receipts allow you to check to see if the element has been sent.

     * The timeout parameter allows you to do any of the following:

     * 

     * - Do an instantaneous check (pass timeout == 0)

     * - Wait until the element has been sent (pass timeout < 0)

     * - Wait up to a certain amount of time (pass timeout > 0)

     * 

     * 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.

    **/

    - (BOOL)wait:(NSTimeInterval)timeout;

     

    @end

  • 相关阅读:
    一个web应用的诞生(4)
    一个web应用的诞生(7)
    一个web应用的诞生(6)
    HTTP状态码大全(转自wiki)
    十分钟搞懂什么是CGI
    HTTP真的很简单
    QT程序在发布的时候应注意的地方
    QT中获取选中的radioButton的两种方法
    WinEdit编辑器中中文乱码
    C++ lstrlen()
  • 原文地址:https://www.cnblogs.com/guligei/p/3513879.html
Copyright © 2011-2022 走看看