Ignore:
Timestamp:
Apr 26, 2013 6:01:43 AM (8 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/pjlib/src/pj/ssl_sock_ossl.c

    r4466 r4506  
    23782378        goto on_error; 
    23792379 
     2380    /* Apply SO_REUSEADDR */ 
     2381    if (ssock->param.reuse_addr) { 
     2382        int enabled = 1; 
     2383        status = pj_sock_setsockopt(ssock->sock, pj_SOL_SOCKET(), 
     2384                                    pj_SO_REUSEADDR(), 
     2385                                    &enabled, sizeof(enabled)); 
     2386        if (status != PJ_SUCCESS) { 
     2387            PJ_PERROR(4,(ssock->pool->obj_name, status, 
     2388                         "Warning: error applying SO_REUSEADDR")); 
     2389        } 
     2390    } 
     2391 
    23802392    /* Apply QoS, if specified */ 
    23812393    status = pj_sock_apply_qos2(ssock->sock, ssock->param.qos_type, 
Note: See TracChangeset for help on using the changeset viewer.