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
0a032e17
Commit
0a032e17
authored
Feb 18, 2015
by
Jason Paryani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add abortRead to AyncIoStream
This is analagous to shutdownWrite, but for the read end of the stream
parent
c9332ebe
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
async-io.c++
c++/src/kj/async-io.c++
+6
-0
async-io.h
c++/src/kj/async-io.h
+4
-0
No files found.
c++/src/kj/async-io.c++
View file @
0a032e17
...
...
@@ -180,6 +180,12 @@ public:
KJ_SYSCALL
(
shutdown
(
fd
,
SHUT_WR
));
}
void
abortRead
()
override
{
// There's no legitimate way to get an AsyncStreamFd that isn't a socket through the
// UnixAsyncIoProvider interface.
KJ_SYSCALL
(
shutdown
(
fd
,
SHUT_RD
));
}
void
getsockopt
(
int
level
,
int
option
,
void
*
value
,
uint
*
length
)
override
{
socklen_t
socklen
=
*
length
;
KJ_SYSCALL
(
::
getsockopt
(
fd
,
level
,
option
,
value
,
&
socklen
));
...
...
c++/src/kj/async-io.h
View file @
0a032e17
...
...
@@ -64,6 +64,10 @@ public:
virtual
void
shutdownWrite
()
=
0
;
// Cleanly shut down just the write end of the stream, while keeping the read end open.
virtual
void
abortRead
()
{}
// Similar to shutdownWrite, but this will shut down the read end of the stream, and should only
// be called when an error has occurred.
virtual
void
getsockopt
(
int
level
,
int
option
,
void
*
value
,
uint
*
length
);
virtual
void
setsockopt
(
int
level
,
int
option
,
const
void
*
value
,
uint
length
);
// Corresponds to getsockopt() and setsockopt() syscalls. Will throw an "unimplemented" exception
...
...
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