summaryrefslogtreecommitdiff
path: root/pjnath/include/pjnath/turn_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'pjnath/include/pjnath/turn_sock.h')
-rw-r--r--pjnath/include/pjnath/turn_sock.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/pjnath/include/pjnath/turn_sock.h b/pjnath/include/pjnath/turn_sock.h
index e2e0c040..e0931ab9 100644
--- a/pjnath/include/pjnath/turn_sock.h
+++ b/pjnath/include/pjnath/turn_sock.h
@@ -248,6 +248,29 @@ PJ_DECL(pj_status_t) pj_turn_sock_alloc(pj_turn_sock *turn_sock,
const pj_turn_alloc_param *param);
/**
+ * 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 turn_sock The TURN transport instance.
+ * @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_sock_set_perm(pj_turn_sock *turn_sock,
+ 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