Ignore:
Timestamp:
Sep 14, 2018 1:27:32 AM (6 years ago)
Author:
ming
Message:

Fixed #2149: Add option to disable transport connection reuse via the setting pjsip_tpselector.disable_connection_reuse

Thanks to Joshua Colp for the patch.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip/include/pjsip/sip_transport.h

    r5851 r5884  
    222222 * should be used to send request. This structure is used when calling 
    223223 * pjsip_tsx_set_transport() and pjsip_dlg_set_transport(). 
     224 * 
     225 * If application disables connection reuse and wants to force creating 
     226 * a new transport, it needs to consider the following couple of things: 
     227 * - If it still wants to reuse an existing transport (if any), it 
     228 *   needs to keep a reference to that transport and specifically set 
     229 *   the transport to be used for sending requests. 
     230 * - Delete those existing transports manually when no longer needed. 
    224231 */ 
    225232typedef struct pjsip_tpselector 
     
    227234    /** The type of data in the union */ 
    228235    pjsip_tpselector_type   type; 
     236 
     237    /** 
     238     * Whether to disable reuse of an existing connection. 
     239     * This setting will be ignored if (type == PJSIP_TPSELECTOR_TRANSPORT) 
     240     * and transport in the union below is set. 
     241     */ 
     242    pj_bool_t disable_connection_reuse; 
    229243 
    230244    /** Union representing the transport/listener criteria to be used. */ 
Note: See TracChangeset for help on using the changeset viewer.