Ignore:
Timestamp:
Jun 19, 2013 9:06:55 AM (7 years ago)
Author:
nanang
Message:

Close #1681:

  • Added compile-time settings PJMEDIA_TRANSPORT_SO_RCVBUF_SIZE and PJMEDIA_TRANSPORT_SO_SNDBUF_SIZE. The default values are both 64 KB when PJMEDIA_HAS_VIDEO is set, otherwise just zero (socket buffer size uses OS default). The settings will be applied to media transport UDP and ICE.
  • Also added run-time settings so_sndbuf_size and so_rcvbuf_size into ICE stream transport, STUN socket, and TURN socket. Default values are all zero.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjnath/src/pjnath/ice_strans.c

    r4537 r4538  
    297297    } 
    298298 
     299    /* Override with component specific socket buffer size settings, if any */ 
     300    if (ice_st->cfg.comp[comp->comp_id-1].so_rcvbuf_size > 0) { 
     301        ice_st->cfg.turn.cfg.so_rcvbuf_size =  
     302            ice_st->cfg.comp[comp->comp_id-1].so_rcvbuf_size; 
     303    } 
     304    if (ice_st->cfg.comp[comp->comp_id-1].so_sndbuf_size > 0) { 
     305        ice_st->cfg.turn.cfg.so_sndbuf_size =  
     306            ice_st->cfg.comp[comp->comp_id-1].so_sndbuf_size; 
     307    } 
     308 
    299309    /* Create the TURN transport */ 
    300310    status = pj_turn_sock_create(&ice_st->cfg.stun_cfg, ice_st->cfg.af, 
     
    382392                      &ice_st->cfg.comp[comp_id-1].qos_params, 
    383393                      sizeof(ice_st->cfg.stun.cfg.qos_params)); 
     394        } 
     395 
     396        /* Override component specific socket buffer size settings, if any */ 
     397        if (ice_st->cfg.comp[comp_id-1].so_rcvbuf_size > 0) { 
     398            ice_st->cfg.stun.cfg.so_rcvbuf_size =  
     399                ice_st->cfg.comp[comp_id-1].so_rcvbuf_size; 
     400        } 
     401        if (ice_st->cfg.comp[comp_id-1].so_sndbuf_size > 0) { 
     402            ice_st->cfg.stun.cfg.so_sndbuf_size =  
     403                ice_st->cfg.comp[comp_id-1].so_sndbuf_size; 
    384404        } 
    385405 
Note: See TracChangeset for help on using the changeset viewer.