Changeset 2177
- Timestamp:
- Jul 25, 2008 10:45:34 AM (16 years ago)
- Location:
- pjproject/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjlib/include/pj/activesock.h
r2039 r2177 414 414 int addr_len); 415 415 416 #if PJ_HAS_TCP 416 417 /** 417 418 * Starts asynchronous socket accept() operations on this active socket. … … 458 459 int addr_len); 459 460 461 #endif /* PJ_HAS_TCP */ 460 462 461 463 /** -
pjproject/trunk/pjlib/src/pj/activesock.c
r2039 r2177 76 76 pj_ioqueue_op_key_t *op_key, 77 77 pj_ssize_t bytes_sent); 78 #if PJ_HAS_TCP 78 79 static void ioqueue_on_accept_complete(pj_ioqueue_key_t *key, 79 80 pj_ioqueue_op_key_t *op_key, … … 82 83 static void ioqueue_on_connect_complete(pj_ioqueue_key_t *key, 83 84 pj_status_t status); 84 85 #endif 85 86 86 87 PJ_DEF(void) pj_activesock_cfg_default(pj_activesock_cfg *cfg) … … 122 123 ioq_cb.on_read_complete = &ioqueue_on_read_complete; 123 124 ioq_cb.on_write_complete = &ioqueue_on_write_complete; 125 #if PJ_HAS_TCP 124 126 ioq_cb.on_connect_complete = &ioqueue_on_connect_complete; 125 127 ioq_cb.on_accept_complete = &ioqueue_on_accept_complete; 128 #endif 126 129 127 130 status = pj_ioqueue_register_sock(pool, ioqueue, sock, asock, … … 488 491 } 489 492 490 493 #if PJ_HAS_TCP 491 494 PJ_DEF(pj_status_t) pj_activesock_start_accept(pj_activesock_t *asock, 492 495 pj_pool_t *pool) … … 578 581 } 579 582 580 581 583 static void ioqueue_on_connect_complete(pj_ioqueue_key_t *key, 582 584 pj_status_t status) … … 595 597 } 596 598 } 597 599 #endif /* PJ_HAS_TCP */ 600 -
pjproject/trunk/pjnath/src/pjnath/turn_sock.c
r1988 r2177 112 112 PJ_ASSERT_RETURN(af==pj_AF_INET() || af==pj_AF_INET6(), PJ_EINVAL); 113 113 PJ_ASSERT_RETURN(options==0, PJ_EINVAL); 114 PJ_ASSERT_RETURN(conn_type!=PJ_TURN_TP_TCP || PJ_HAS_TCP, PJ_EINVAL); 114 115 115 116 switch (conn_type) { … … 641 642 642 643 /* Initiate non-blocking connect */ 644 #if PJ_HAS_TCP 643 645 status=pj_activesock_start_connect(turn_sock->active_sock, 644 646 turn_sock->pool, … … 651 653 return; 652 654 } 655 #else 656 on_connect_complete(turn_sock->active_sock, PJ_SUCCESS); 657 #endif 653 658 654 659 /* Done for now. Subsequent work will be done in -
pjproject/trunk/pjnath/src/pjturn-srv/listener_tcp.c
r1913 r2177 20 20 #include <pj/compat/socket.h> 21 21 22 #if PJ_HAS_TCP 23 22 24 struct accept_op 23 25 { … … 479 481 } 480 482 483 #else /* PJ_HAS_TCP */ 484 485 /* To avoid empty translation unit warning */ 486 int listener_tcp_dummy = 0; 487 488 #endif /* PJ_HAS_TCP */ 489 -
pjproject/trunk/pjnath/src/pjturn-srv/main.c
r1929 r2177 147 147 return err("Error creating UDP listener", status); 148 148 149 #if PJ_HAS_TCP 149 150 status = pj_turn_listener_create_tcp(srv, pj_AF_INET(), NULL, 150 151 TURN_PORT, 1, 0, &listener); 151 152 if (status != PJ_SUCCESS) 152 153 return err("Error creating listener", status); 154 #endif 153 155 154 156 status = pj_turn_srv_add_listener(srv, listener);
Note: See TracChangeset
for help on using the changeset viewer.