Changeset 20
- Timestamp:
- Nov 7, 2005 6:25:16 PM (19 years ago)
- Location:
- pjproject/main/pjlib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/main/pjlib/build/os-win32.mak
r18 r20 14 14 pool_policy_malloc.o sock_bsd.o sock_select.o 15 15 16 export PJLIB_OBJS += ioqueue_win 32.o16 export PJLIB_OBJS += ioqueue_winnt.o 17 17 #export PJLIB_OBJS += ioqueue_select.o 18 18 19 export PJLIB_OBJS += file_io_win32.o 19 export PJLIB_OBJS += file_io_win32.o file_access_win32.o 20 20 #export PJLIB_OBJS += file_io_ansi.o 21 21 -
pjproject/main/pjlib/src/pjlib-test/echo_clt.c
r19 r20 16 16 17 17 static pj_atomic_t *totalBytes; 18 static pj_atomic_t *timeout_counter; 19 static pj_atomic_t *invalid_counter; 18 20 19 21 #define MSEC_PRINT_DURATION 1000 … … 44 46 pj_uint32_t buffer_id; 45 47 pj_uint32_t buffer_counter; 46 pj_uint32_t timeout_counter=0, invalid_counter=0;47 48 struct client *client = arg; 48 49 pj_status_t last_recv_err = PJ_SUCCESS, last_send_err = PJ_SUCCESS; … … 89 90 int rc; 90 91 pj_ssize_t bytes; 91 pj_uint32_t *p_buffer_id, *p_buffer_counter;92 92 93 93 ++counter; 94 94 95 while (wait_socket(sock,0) > 0)96 ;95 //while (wait_socket(sock,0) > 0) 96 // ; 97 97 98 98 /* Send a packet. */ … … 114 114 PJ_LOG(3,("", "...timeout")); 115 115 bytes = 0; 116 timeout_counter++;116 pj_atomic_inc(timeout_counter); 117 117 } else if (rc < 0) { 118 118 rc = pj_get_netos_error(); … … 149 149 "recv_buf=%s\n", 150 150 counter, send_buf, recv_buf)); 151 //break;151 pj_atomic_inc(invalid_counter); 152 152 } 153 153 … … 181 181 return -30; 182 182 } 183 rc = pj_atomic_create(pool, 0, &invalid_counter); 184 rc = pj_atomic_create(pool, 0, &timeout_counter); 183 185 184 186 PJ_LOG(3,("", "Echo client started")); … … 207 209 pj_time_val elapsed; 208 210 unsigned bw32; 211 pj_uint32_t timeout, invalid; 209 212 210 213 pj_thread_sleep(1000); … … 226 229 last_received = received; 227 230 228 PJ_LOG(3,("", "...%d threads, total bandwidth: %d KB/s", 229 ECHO_CLIENT_MAX_THREADS, bw32/1000)); 231 timeout = pj_atomic_get(timeout_counter); 232 invalid = pj_atomic_get(invalid_counter); 233 234 PJ_LOG(3,("", 235 "...%d threads, total bandwidth: %d KB/s, " 236 "timeout=%d, invalid=%d", 237 ECHO_CLIENT_MAX_THREADS, bw32/1000, 238 timeout, invalid)); 230 239 } 231 240 -
pjproject/main/pjlib/src/pjlib-test/test.h
r19 r20 37 37 #define INCLUDE_XML_TEST GROUP_EXTRA 38 38 39 #define INCLUDE_ECHO_SERVER 140 #define INCLUDE_ECHO_CLIENT 039 #define INCLUDE_ECHO_SERVER 0 40 #define INCLUDE_ECHO_CLIENT 1 41 41 42 42
Note: See TracChangeset
for help on using the changeset viewer.