diff options
Diffstat (limited to 'pjnath/include/pjnath/turn_session.h')
-rw-r--r-- | pjnath/include/pjnath/turn_session.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/pjnath/include/pjnath/turn_session.h b/pjnath/include/pjnath/turn_session.h index f028fd8e..88cf1bfe 100644 --- a/pjnath/include/pjnath/turn_session.h +++ b/pjnath/include/pjnath/turn_session.h @@ -437,6 +437,21 @@ PJ_DECL(void) pj_turn_session_set_log(pj_turn_session *sess, /** + * Configure the SOFTWARE name to be sent in all STUN requests by the + * TURN session. + * + * @param sess The TURN client session. + * @param sw Software name string. If this argument is NULL or + * empty, the session will not include SOFTWARE attribute + * in STUN requests and responses. + * + * @return PJ_SUCCESS on success, or the appropriate error code. + */ +PJ_DECL(pj_status_t) pj_turn_session_set_software_name(pj_turn_session *sess, + const pj_str_t *sw); + + +/** * Set the server or domain name of the server. Before the application * can send Allocate request (with pj_turn_session_alloc()), it must first * resolve the server address(es) using this function. This function will @@ -519,6 +534,30 @@ PJ_DECL(pj_status_t) pj_turn_session_alloc(pj_turn_session *sess, /** + * Create or renew permission in the TURN server for the specified peer IP + * addresses. Application must install permission for a particular (peer) + * IP address before it sends any data to that IP address, or otherwise + * the TURN server will drop the data. + * + * @param sess The TURN client session. + * @param addr_cnt Number of IP addresses. + * @param addr Array of peer IP addresses. Only the address family + * and IP address portion of the socket address matter. + * @param options Specify 1 to let the TURN client session automatically + * renew the permission later when they are about to + * expire. + * + * @return PJ_SUCCESS if the operation has been successfully + * issued, or the appropriate error code. Note that + * the operation itself will complete asynchronously. + */ +PJ_DECL(pj_status_t) pj_turn_session_set_perm(pj_turn_session *sess, + unsigned addr_cnt, + const pj_sockaddr addr[], + unsigned options); + + +/** * Send a data to the specified peer address via the TURN relay. This * function will encapsulate the data as STUN Send Indication or TURN * ChannelData packet and send the message to the TURN server. The TURN |