Changeset 967
- Timestamp:
- Feb 18, 2007 1:50:01 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/samples/sipstateless.c
r956 r967 21 21 * sipcore.c 22 22 * 23 * This program is only used to measure the footprint of the SIP core. 24 * When UDP transport is included (with HAS_UDP_TRANSPORT macro), the 25 * executable will respond any incoming requests with 501 (Not Implemented) 26 * response statelessly. 23 * A simple program to respond any incoming requests (except ACK, of course!) 24 * with any status code (taken from command line argument, with the default 25 * is 501/Not Implemented). 27 26 */ 28 27 … … 37 36 #define HAS_UDP_TRANSPORT 38 37 38 /* If this macro is set, TCP transport will be initialized at port 5060 */ 39 #define HAS_TCP_TRANSPORT 39 40 40 41 /* Log identification */ … … 141 142 #endif 142 143 144 #ifdef HAS_TCP_TRANSPORT 145 /* 146 * Add UDP transport, with hard-coded port 147 */ 148 { 149 pj_sockaddr_in addr; 150 151 addr.sin_family = PJ_AF_INET; 152 addr.sin_addr.s_addr = 0; 153 addr.sin_port = pj_htons(5060); 154 155 status = pjsip_tcp_transport_start(sip_endpt, &addr, 1, NULL); 156 if (status != PJ_SUCCESS) { 157 PJ_LOG(3,(THIS_FILE, 158 "Error starting TCP transport (port in use?)")); 159 return 1; 160 } 161 } 162 #endif 163 143 164 /* 144 165 * Register our module to receive incoming requests.
Note: See TracChangeset
for help on using the changeset viewer.