Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
02a1032f
Commit
02a1032f
authored
Aug 11, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated ssl_wrapper
parent
e0822ffb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
5 deletions
+14
-5
ws_ssl.c
examples/ws_ssl/ws_ssl.c
+14
-5
No files found.
examples/ws_ssl/ws_ssl.c
View file @
02a1032f
...
@@ -21,10 +21,10 @@ struct config {
...
@@ -21,10 +21,10 @@ struct config {
};
};
static
struct
config
s_wrappers
[]
=
{
static
struct
config
s_wrappers
[]
=
{
{
"ws1"
,
{
"127.0.0.1"
,
9001
,
0
,
NULL
,
"7001"
,
NULL
}},
{
"ws1"
,
{
"127.0.0.1"
,
9001
,
0
,
NULL
,
"7001"
,
NULL
,
""
}},
{
"ws1"
,
{
"127.0.0.1"
,
9001
,
0
,
NULL
,
"7002"
,
"certs/ws1_server.pem"
}},
{
"ws1"
,
{
"127.0.0.1"
,
9001
,
0
,
NULL
,
"7002"
,
"certs/ws1_server.pem"
,
""
}},
{
"ws2"
,
{
"127.0.0.1"
,
9002
,
1
,
NULL
,
"7003"
,
NULL
}},
{
"ws2"
,
{
"127.0.0.1"
,
9002
,
1
,
NULL
,
"7003"
,
NULL
,
""
}},
{
"ws2"
,
{
"127.0.0.1"
,
9002
,
1
,
NULL
,
"7004"
,
"certs/ws2_server.pem"
}}
{
"ws2"
,
{
"127.0.0.1"
,
9002
,
1
,
NULL
,
"7004"
,
"certs/ws2_server.pem"
,
""
}}
};
};
static
int
s_received_signal
=
0
;
static
int
s_received_signal
=
0
;
...
@@ -101,7 +101,16 @@ static void *serve_thread_func(void *param) {
...
@@ -101,7 +101,16 @@ static void *serve_thread_func(void *param) {
}
}
static
void
*
wrapper_thread_func
(
void
*
param
)
{
static
void
*
wrapper_thread_func
(
void
*
param
)
{
ssl_wrapper_serve
(
&
((
struct
config
*
)
param
)
->
c
,
&
s_received_signal
);
struct
ssl_wrapper_config
*
cfg
=
&
((
struct
config
*
)
param
)
->
c
;
const
char
*
err_msg
;
void
*
wrapper
;
if
((
wrapper
=
ssl_wrapper_init
(
cfg
,
&
err_msg
))
==
NULL
)
{
fprintf
(
stderr
,
"Error: %s
\n
"
,
err_msg
);
exit
(
EXIT_FAILURE
);
}
ssl_wrapper_serve
(
wrapper
,
&
s_received_signal
);
return
NULL
;
return
NULL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment