summaryrefslogtreecommitdiff
path: root/pjlib/include/pj/ssl_sock.h
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/include/pj/ssl_sock.h')
-rw-r--r--pjlib/include/pj/ssl_sock.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/pjlib/include/pj/ssl_sock.h b/pjlib/include/pj/ssl_sock.h
index c24e7bd9..f31a0452 100644
--- a/pjlib/include/pj/ssl_sock.h
+++ b/pjlib/include/pj/ssl_sock.h
@@ -864,6 +864,18 @@ PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param);
/**
+ * Duplicate pj_ssl_sock_param.
+ *
+ * @param pool Pool to allocate memory.
+ * @param dst Destination parameter.
+ * @param src Source parameter.
+ */
+PJ_DECL(void) pj_ssl_sock_param_copy(pj_pool_t *pool,
+ pj_ssl_sock_param *dst,
+ const pj_ssl_sock_param *src);
+
+
+/**
* Create secure socket instance.
*
* @param pool The pool for allocating secure socket instance.
@@ -1115,6 +1127,30 @@ PJ_DECL(pj_status_t) pj_ssl_sock_start_accept(pj_ssl_sock_t *ssock,
/**
+ * Same as #pj_ssl_sock_start_accept(), but application can provide
+ * a secure socket parameter, which will be used to create a new secure
+ * socket reported in \a on_accept_complete() callback when there is
+ * an incoming connection.
+ *
+ * @param ssock The secure socket.
+ * @param pool Pool used to allocate some internal data for the
+ * operation.
+ * @param localaddr Local address to bind on.
+ * @param addr_len Length of buffer containing local address.
+ * @param newsock_param Secure socket parameter for new accepted sockets.
+ *
+ * @return PJ_SUCCESS if the operation has been successful,
+ * or the appropriate error code on failure.
+ */
+PJ_DECL(pj_status_t)
+pj_ssl_sock_start_accept2(pj_ssl_sock_t *ssock,
+ pj_pool_t *pool,
+ const pj_sockaddr_t *local_addr,
+ int addr_len,
+ const pj_ssl_sock_param *newsock_param);
+
+
+/**
* Starts asynchronous socket connect() operation and SSL/TLS handshaking
* for this socket. Once the connection is done (either successfully or not),
* the \a on_connect_complete() callback will be called.