Changeset 1986
- Timestamp:
- Jun 6, 2008 2:12:23 PM (16 years ago)
- Location:
- pjproject/trunk/pjlib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/activesock.h
r1953 r1986 228 228 * @param cb Pointer to structure containing application 229 229 * callbacks. 230 * @param user_data Arbitrary user data to be associated with this 231 * active socket. 230 232 * @param p_asock Pointer to receive the active socket instance. 231 233 * … … 239 241 pj_ioqueue_t *ioqueue, 240 242 const pj_activesock_cb *cb, 243 void *user_data, 241 244 pj_activesock_t **p_asock); 242 245 … … 254 257 * @param cb Pointer to structure containing application 255 258 * callbacks. 259 * @param user_data Arbitrary user data to be associated with this 260 * active socket. 256 261 * @param p_asock Pointer to receive the active socket instance. 257 262 * @param bound_addr If this argument is specified, it will be filled with … … 266 271 pj_ioqueue_t *ioqueue, 267 272 const pj_activesock_cb *cb, 273 void *user_data, 268 274 pj_activesock_t **p_asock, 269 275 pj_sockaddr *bound_addr); -
pjproject/trunk/pjlib/src/pj/activesock.c
r1962 r1986 98 98 pj_ioqueue_t *ioqueue, 99 99 const pj_activesock_cb *cb, 100 void *user_data, 100 101 pj_activesock_t **p_asock) 101 102 { … … 115 116 asock->async_count = (opt? opt->async_cnt : 1); 116 117 asock->max_loop = PJ_ACTIVESOCK_MAX_LOOP; 118 asock->user_data = user_data; 117 119 pj_memcpy(&asock->cb, cb, sizeof(*cb)); 118 120 … … 144 146 pj_ioqueue_t *ioqueue, 145 147 const pj_activesock_cb *cb, 148 void *user_data, 146 149 pj_activesock_t **p_asock, 147 150 pj_sockaddr *bound_addr) … … 169 172 170 173 status = pj_activesock_create(pool, sock_fd, pj_SOCK_DGRAM(), opt, 171 ioqueue, cb, p_asock);174 ioqueue, cb, user_data, p_asock); 172 175 if (status != PJ_SUCCESS) { 173 176 pj_sock_close(sock_fd); -
pjproject/trunk/pjlib/src/pjlib-test/activesock.c
r1953 r1986 115 115 116 116 status = pj_activesock_create_udp(pool, &addr, NULL, ioqueue, &activesock_cb, 117 &srv->asock, &addr);117 srv, &srv->asock, &addr); 118 118 if (status != PJ_SUCCESS) { 119 119 pj_sock_close(sock_fd); … … 124 124 srv->port = pj_ntohs(addr.ipv4.sin_port); 125 125 126 pj_activesock_set_user_data(srv->asock, srv);127 126 pj_ioqueue_op_key_init(&srv->send_key, sizeof(srv->send_key)); 128 127
Note: See TracChangeset
for help on using the changeset viewer.