Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
c99ade06
Commit
c99ade06
authored
Apr 25, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore ENOPROTOOPT on SO_RCVBUF in serialize-async-test.
Fixes #456
parent
ec794aee
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
serialize-async-test.c++
c++/src/capnp/serialize-async-test.c++
+4
-1
No files found.
c++/src/capnp/serialize-async-test.c++
View file @
c99ade06
...
...
@@ -128,11 +128,14 @@ public:
// chains.
// - Cygwin will apparently actually use a buffer size of 0 and therefore block forever waiting
// for buffer space.
// - GNU HURD throws ENOPROTOOPT for SO_RCVBUF. Apparently, technically, a Unix domain socket
// has only one buffer, and it's controlled via SO_SNDBUF on the other end. OK, we'll ignore
// errors on SO_RCVBUF, then.
//
// Anyway, we now use 127 to avoid these issues (but also to screw around with non-word-boundary
// writes).
uint
small
=
127
;
KJ_SOCKCALL
(
setsockopt
(
fds
[
0
],
SOL_SOCKET
,
SO_RCVBUF
,
(
const
char
*
)
&
small
,
sizeof
(
small
)
));
setsockopt
(
fds
[
0
],
SOL_SOCKET
,
SO_RCVBUF
,
(
const
char
*
)
&
small
,
sizeof
(
small
));
KJ_SOCKCALL
(
setsockopt
(
fds
[
1
],
SOL_SOCKET
,
SO_SNDBUF
,
(
const
char
*
)
&
small
,
sizeof
(
small
)));
}
~
PipeWithSmallBuffer
()
{
...
...
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