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
4120f953
Commit
4120f953
authored
Aug 31, 2016
by
Deomid Ryabkov
Committed by
Cesanta Bot
Aug 31, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report bind error in simplest_web_server_ssl
PUBLISHED_FROM=73e7ed5dd69cbca00ad6f67125915fbfb296770b
parent
844c7787
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
simplest_web_server_ssl.c
examples/simplest_web_server_ssl/simplest_web_server_ssl.c
+4
-1
No files found.
examples/simplest_web_server_ssl/simplest_web_server_ssl.c
View file @
4120f953
...
...
@@ -29,16 +29,19 @@ int main(void) {
struct
mg_mgr
mgr
;
struct
mg_connection
*
nc
;
struct
mg_bind_opts
bind_opts
;
const
char
*
err
;
mg_mgr_init
(
&
mgr
,
NULL
);
memset
(
&
bind_opts
,
0
,
sizeof
(
bind_opts
));
bind_opts
.
ssl_cert
=
s_ssl_cert
;
bind_opts
.
ssl_key
=
s_ssl_key
;
bind_opts
.
error_string
=
&
err
;
printf
(
"Starting SSL server on port %s, cert from %s, key from %s
\n
"
,
s_http_port
,
bind_opts
.
ssl_cert
,
bind_opts
.
ssl_key
);
nc
=
mg_bind_opt
(
&
mgr
,
s_http_port
,
ev_handler
,
bind_opts
);
if
(
nc
==
NULL
)
{
printf
(
"Failed to create listener
\n
"
);
printf
(
"Failed to create listener
: %s
\n
"
,
err
);
return
1
;
}
...
...
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