summaryrefslogtreecommitdiff
path: root/src/ICE/pjproject.h
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2020-08-30 17:31:48 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2020-10-17 21:08:05 +0200
commit93e583408af5f41f9dde324f198e47fa94e1881e (patch)
treecbe367236542e64571ce5cbf509d5ef9d515272c /src/ICE/pjproject.h
parent1eeb5cba2d3bbe07a19af65cb68375a9112ca8b8 (diff)
Peer connection through ICE
Diffstat (limited to 'src/ICE/pjproject.h')
-rw-r--r--src/ICE/pjproject.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ICE/pjproject.h b/src/ICE/pjproject.h
new file mode 100644
index 0000000..e230e75
--- /dev/null
+++ b/src/ICE/pjproject.h
@@ -0,0 +1,14 @@
+#pragma once
+
+#include <pjnath.h>
+#include <HsFFI.h>
+
+pj_ice_strans * ice_create(pj_ice_sess_role role, HsStablePtr sptr, HsStablePtr cb);
+void ice_destroy(pj_ice_strans * strans);
+
+ssize_t ice_encode_session(pj_ice_strans *, char * ufrag, char * pass,
+ char * def, char * candidates[], size_t maxlen, size_t maxcand);
+void ice_connect(pj_ice_strans * strans, HsStablePtr cb,
+ const char * ufrag, const char * pass,
+ const char * defcand, const char * candidates[], size_t ncand);
+void ice_send(pj_ice_strans *, const char * data, size_t len);