Changeset 563 for pjproject/trunk/pjsip/src/test-pjsip/transport_udp_test.c
- Timestamp:
- Jun 28, 2006 4:46:49 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip/src/test-pjsip/transport_udp_test.c
r550 r563 30 30 int transport_udp_test(void) 31 31 { 32 enum { SEND_RECV_LOOP = 2};32 enum { SEND_RECV_LOOP = 8 }; 33 33 pjsip_transport *udp_tp, *tp; 34 34 pj_sockaddr_in addr, rem_addr; 35 35 pj_str_t s; 36 36 pj_status_t status; 37 unsigned rtt[SEND_RECV_LOOP], min_rtt; 37 38 int i, pkt_lost; 38 39 … … 80 81 for (i=0; i<SEND_RECV_LOOP; ++i) { 81 82 status = transport_send_recv_test(PJSIP_TRANSPORT_UDP, tp, 82 "sip:alice@127.0.0.1:"TEST_UDP_PORT_STR); 83 "sip:alice@127.0.0.1:"TEST_UDP_PORT_STR, 84 &rtt[i]); 83 85 if (status != 0) 84 86 return status; 85 87 } 88 89 min_rtt = 0xFFFFFFF; 90 for (i=0; i<SEND_RECV_LOOP; ++i) 91 if (rtt[i] < min_rtt) min_rtt = rtt[i]; 92 93 report_ival("udp-rtt-usec", min_rtt, "usec", 94 "Best UDP transport round trip time, in microseconds " 95 "(time from sending request until response is received. " 96 "Tests were performed on local machine only)"); 97 86 98 87 99 /* Multi-threaded round-trip test. */
Note: See TracChangeset
for help on using the changeset viewer.