Ignore:
Timestamp:
Oct 11, 2011 4:37:37 AM (13 years ago)
Author:
bennylp
Message:

Fixed #1384: HTTP client source port range setting (thanks Johan Lantz for the patch)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x/pjlib-util/include/pjlib-util/http_client.h

    r3553 r3810  
    189189    pj_http_auth_cred   auth_cred; 
    190190 
     191    /** 
     192     * Optional source port range to use when binding the socket. 
     193     * This can be used if the source port needs to be within a certain range 
     194     * for instance due to strict firewall settings. The port used will be 
     195     * randomized within the range. 
     196     * 
     197     * Note that if authentication is configured, the authentication response 
     198     * will be a new transaction 
     199     * 
     200     * Default is 0 (The OS will select the source port automatically) 
     201     */ 
     202    pj_uint16_t         source_port_range_start; 
     203 
     204    /** 
     205     * Optional source port range to use when binding. 
     206     * The size of the port restriction range 
     207     * 
     208     * Default is 0 (The OS will select the source port automatically)) 
     209     */ 
     210    pj_uint16_t         source_port_range_size; 
     211 
     212    /** 
     213     * Max number of retries if binding to a port fails. 
     214     * Note that this does not adress the scenario where a request times out 
     215     * or errors. This needs to be taken care of by the on_complete callback. 
     216     * 
     217     * Default is 3 
     218     */ 
     219    pj_uint16_t         max_retries; 
     220 
    191221} pj_http_req_param; 
    192222 
Note: See TracChangeset for help on using the changeset viewer.