Ignore:
Timestamp:
Sep 18, 2018 12:07:50 PM (12 months ago)
Author:
riza
Message:

Close #2150: Add new callback to notify when accept operation fails on TLS
listener.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/include/pj/ssl_sock.h

    r5821 r5885  
    606606    /** 
    607607     * This callback is called when new connection arrives as the result 
    608      * of pj_ssl_sock_start_accept(). 
     608     * of pj_ssl_sock_start_accept(). If the status of accept operation is 
     609     * needed use on_accept_complete2 instead of this callback. 
    609610     * 
    610611     * @param ssock     The secure socket. 
     
    622623                                    const pj_sockaddr_t *src_addr, 
    623624                                    int src_addr_len); 
     625    /** 
     626     * This callback is called when new connection arrives as the result 
     627     * of pj_ssl_sock_start_accept(). 
     628     * 
     629     * @param asock     The active socket. 
     630     * @param newsock   The new incoming socket. 
     631     * @param src_addr  The source address of the connection. 
     632     * @param addr_len  Length of the source address. 
     633     * @param status    The status of the accept operation. This may contain 
     634     *                  non-PJ_SUCCESS for example when the TCP listener is in 
     635     *                  bad state for example on iOS platform after the 
     636     *                  application waking up from background. 
     637     * 
     638     * @return          PJ_TRUE if further accept() is desired, and PJ_FALSE 
     639     *                  when application no longer wants to accept incoming 
     640     *                  connection. Application may destroy the active socket 
     641     *                  in the callback and return PJ_FALSE here. 
     642     */ 
     643    pj_bool_t (*on_accept_complete2)(pj_ssl_sock_t *ssock, 
     644                                     pj_ssl_sock_t *newsock, 
     645                                     const pj_sockaddr_t *src_addr, 
     646                                     int src_addr_len,  
     647                                     pj_status_t status); 
    624648 
    625649    /** 
Note: See TracChangeset for help on using the changeset viewer.