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
bd15ad43
Commit
bd15ad43
authored
7 years ago
by
Dmitry Frank
Committed by
Cesanta Bot
7 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve err handling in pubsub example
PUBLISHED_FROM=7660e252e1ac84bf2245718c548fb00288ff4e47
parent
e5b3b8ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
publish_subscribe.c
examples/publish_subscribe/publish_subscribe.c
+3
-1
No files found.
examples/publish_subscribe/publish_subscribe.c
View file @
bd15ad43
...
@@ -23,7 +23,9 @@ static void *stdin_thread(void *param) {
...
@@ -23,7 +23,9 @@ static void *stdin_thread(void *param) {
// Forward all types characters to the socketpair
// Forward all types characters to the socketpair
while
((
ch
=
getchar
())
!=
EOF
)
{
while
((
ch
=
getchar
())
!=
EOF
)
{
unsigned
char
c
=
(
unsigned
char
)
ch
;
unsigned
char
c
=
(
unsigned
char
)
ch
;
send
(
sock
,
(
const
char
*
)
&
c
,
1
,
0
);
if
(
send
(
sock
,
(
const
char
*
)
&
c
,
1
,
0
)
<
0
)
{
fprintf
(
stderr
,
"Failed to send byte to the socket"
);
}
}
}
return
NULL
;
return
NULL
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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