diff --git a/delay_manager.h b/delay_manager.h index c1b0b7e..c418ab5 100644 --- a/delay_manager.h +++ b/delay_manager.h @@ -121,6 +121,7 @@ struct delay_manager_t { assert(0==1); } + int set_capacity(int a){capacity=a;return 0;} ~delay_manager_t(); int get_timer_fd(); int check(); diff --git a/fd_manager.cpp b/fd_manager.cpp index 9bf3313..d07d2d7 100644 --- a/fd_manager.cpp +++ b/fd_manager.cpp @@ -49,7 +49,8 @@ u64_t fd_manager_t::create(int fd) fd_manager_t::fd_manager_t() { counter=u32_t(-1); - counter+=10; + counter+=100; + reserve(10007); } fd_info_t & fd_manager_t::get_info(fd64_t fd64) { diff --git a/main.cpp b/main.cpp index 787c1aa..6bd81a1 100644 --- a/main.cpp +++ b/main.cpp @@ -33,7 +33,7 @@ int disable_fec=0; int debug_force_flush_fec=0; int fec_data_num=20; -int fec_redundant_num=10; +int fec_redundant_num=8; int fec_mtu=1000; int fec_pending_num=30; int fec_pending_time=10000; @@ -1354,10 +1354,10 @@ int main(int argc, char *argv[]) dup2(1, 2); //redirect stderr to stdout int i, j, k; process_arg(argc,argv); - delay_manager.capacity=max_pending_packet; + + delay_manager.set_capacity(max_pending_packet); local_ip_uint32=inet_addr(local_ip); remote_ip_uint32=inet_addr(remote_ip); - fd_manager.reserve(10007); if(program_mode==client_mode) {