Ignore:
Timestamp:
Apr 26, 2013 6:01:43 AM (11 years ago)
Author:
bennylp
Message:

Fixed #1661: Option to use SO_REUSEADDR for TCP and TLS listeners and use it by default on non-Windows platforms

File:
1 edited

Legend:

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

    r4442 r4506  
    570570 
    571571/** 
     572 * Specify whether TCP listener should use SO_REUSEADDR option. This constant 
     573 * will be used as the default value for the "reuse_addr" field in the 
     574 * pjsip_tcp_transport_cfg structure. 
     575 * 
     576 * Default is FALSE on Windows and TRUE on non-Windows. 
     577 * 
     578 * @see PJSIP_TLS_TRANSPORT_REUSEADDR 
     579 */ 
     580#ifndef PJSIP_TCP_TRANSPORT_REUSEADDR 
     581# if defined(PJ_WIN32) && PJ_WIN32 
     582#   define PJSIP_TCP_TRANSPORT_REUSEADDR        0 
     583# else 
     584#   define PJSIP_TCP_TRANSPORT_REUSEADDR        1 
     585# endif 
     586#endif 
     587 
     588 
     589/** 
    572590 * Set the interval to send keep-alive packet for TCP transports. 
    573591 * If the value is zero, keep-alive will be disabled for TCP. 
     
    676694#endif 
    677695 
     696 
     697/** 
     698 * Specify whether TLS listener should use SO_REUSEADDR option. 
     699 * 
     700 * Default is FALSE on Windows and TRUE on non-Windows. 
     701 * 
     702 * @see PJSIP_TCP_TRANSPORT_REUSEADDR 
     703 */ 
     704#ifndef PJSIP_TLS_TRANSPORT_REUSEADDR 
     705# if defined(PJ_WIN32) && PJ_WIN32 
     706#   define PJSIP_TLS_TRANSPORT_REUSEADDR        0 
     707# else 
     708#   define PJSIP_TLS_TRANSPORT_REUSEADDR        1 
     709# endif 
     710#endif 
    678711 
    679712 
Note: See TracChangeset for help on using the changeset viewer.