summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/ssl_sock_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj/ssl_sock_common.c')
-rw-r--r--pjlib/src/pj/ssl_sock_common.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/pjlib/src/pj/ssl_sock_common.c b/pjlib/src/pj/ssl_sock_common.c
new file mode 100644
index 00000000..bcb249fb
--- /dev/null
+++ b/pjlib/src/pj/ssl_sock_common.c
@@ -0,0 +1,43 @@
+/* $Id$ */
+/*
+ * Copyright (C) 2009 Teluu Inc. (http://www.teluu.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+#include <pj/ssl_sock.h>
+#include <pj/string.h>
+
+/*
+ * Initialize the SSL socket configuration with the default values.
+ */
+PJ_DECL(void) pj_ssl_sock_param_default(pj_ssl_sock_param *param)
+{
+ pj_bzero(param, sizeof(*param));
+
+ /* Socket config */
+ param->sock_af = PJ_AF_INET;
+ param->sock_type = pj_SOCK_STREAM();
+ param->async_cnt = 1;
+ param->concurrency = -1;
+ param->whole_data = PJ_TRUE;
+#if PJ_SYMBIAN
+ param->send_buffer_size = 8192;
+#endif
+
+ /* Security config */
+ param->proto = PJ_SSL_SOCK_PROTO_DEFAULT;
+}
+
+