Changeset 5987 for pjproject/trunk/pjnath/include/pjnath/turn_sock.h
- Timestamp:
- May 14, 2019 9:31:39 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjnath/include/pjnath/turn_sock.h
r4606 r5987 98 98 pj_turn_state_t old_state, 99 99 pj_turn_state_t new_state); 100 101 /** 102 * Notification when TURN client received a ConnectionAttempt Indication 103 * from the TURN server, which indicates that peer initiates a TCP 104 * connection to allocated slot in the TURN server. Application should 105 * implement this callback if it uses RFC 6062 (TURN TCP allocations), 106 * otherwise TURN client will automatically accept it. 107 * 108 * If application accepts the peer connection attempt (i.e: by returning 109 * PJ_SUCCESS or not implementing this callback), the TURN socket will 110 * initiate a new connection to the TURN server and send ConnectionBind 111 * request, and eventually will notify application via 112 * on_connection_status callback, if implemented. 113 * 114 * @param turn_sock The TURN client transport. 115 * @param conn_id The connection ID assigned by TURN server. 116 * @param peer_addr Peer address that tried to connect to the 117 * TURN server. 118 * @param addr_len Length of the peer address. 119 * 120 * @return The callback must return PJ_SUCCESS to accept 121 * the connection attempt. 122 */ 123 pj_status_t (*on_connection_attempt)(pj_turn_sock *turn_sock, 124 pj_uint32_t conn_id, 125 const pj_sockaddr_t *peer_addr, 126 unsigned addr_len); 127 128 /** 129 * Notification for initiated TCP data connection to peer (RFC 6062), 130 * for example after peer connection attempt is accepted. 131 * 132 * @param turn_sock The TURN client transport. 133 * @param status The status code. 134 * @param conn_id The connection ID. 135 * @param peer_addr Peer address. 136 * @param addr_len Length of the peer address. 137 */ 138 void (*on_connection_status)(pj_turn_sock *turn_sock, 139 pj_status_t status, 140 pj_uint32_t conn_id, 141 const pj_sockaddr_t *peer_addr, 142 unsigned addr_len); 100 143 101 144 } pj_turn_sock_cb;
Note: See TracChangeset
for help on using the changeset viewer.