Ignore:
Timestamp:
Sep 15, 2017 5:32:08 AM (7 years ago)
Author:
riza
Message:

Re #2041: Implement API to handle IP address change.

File:
1 edited

Legend:

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

    r5284 r5649  
    320320                                                 const pjsip_host_port *a_name); 
    321321 
     322/** 
     323 * Restart the transport. Several operations are supported by this function: 
     324 *  - if transport was made temporarily unavailable to SIP stack with 
     325 *    pjsip_udp_transport_pause() and PJSIP_UDP_TRANSPORT_KEEP_SOCKET, 
     326 *    application can make the transport available to the SIP stack 
     327 *    again, by specifying PJSIP_UDP_TRANSPORT_KEEP_SOCKET flag here. 
     328 *  - if application wants to replace the internal socket with a new 
     329 *    socket, it must specify PJSIP_UDP_TRANSPORT_DESTROY_SOCKET when 
     330 *    calling this function, so that the internal socket will be destroyed 
     331 *    if it hasn't been closed. In this case, application has two choices 
     332 *    on how to create the new socket: 1) to let the transport create 
     333 *    the new socket, in this case the \a sock option should be set 
     334 *    to \a PJ_INVALID_SOCKET and optionally the \a local parameter can be 
     335 *    filled with the desired address and port where the new socket  
     336 *    should be bound to, or 2) to specify its own socket to be used 
     337 *    by this transport, by specifying a valid socket in \a sock argument 
     338 *    and set the \a local argument to NULL. In both cases, application 
     339 *    may specify the published address of the socket in \a a_name 
     340 *    argument. This is another version of pjsip_udp_transport_restart()  
     341 *    able to restart IPv6 transport. 
     342 * 
     343 * @param transport     The UDP transport. 
     344 * @param option        Restart option. 
     345 * @param sock          Optional socket to be used by the transport. 
     346 * @param local         The address where the socket should be bound to. 
     347 *                      If this argument is NULL, socket will be bound 
     348 *                      to any available port. 
     349 * @param a_name        Optionally specify the published address for 
     350 *                      this transport. If the socket is not replaced 
     351 *                      (PJSIP_UDP_TRANSPORT_KEEP_SOCKET flag is 
     352 *                      specified), then if this argument is NULL, the 
     353 *                      previous value will be used. If the socket is 
     354 *                      replaced and this argument is NULL, the bound 
     355 *                      address will be used as the published address  
     356 *                      of the transport. 
     357 * 
     358 * @return              PJ_SUCCESS if transport can be restarted, or 
     359 *                      the appropriate error code. 
     360 */ 
     361PJ_DECL(pj_status_t) pjsip_udp_transport_restart2(pjsip_transport *transport, 
     362                                                unsigned option, 
     363                                                pj_sock_t sock, 
     364                                                const pj_sockaddr *local, 
     365                                                const pjsip_host_port *a_name); 
     366 
    322367 
    323368PJ_END_DECL 
Note: See TracChangeset for help on using the changeset viewer.