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
505e71f7
Commit
505e71f7
authored
Sep 12, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wire up restrictPeers() implementation.
parent
05d0a7ed
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
5 deletions
+23
-5
ez-rpc.c++
c++/src/capnp/ez-rpc.c++
+15
-1
async-io-unix.c++
c++/src/kj/async-io-unix.c++
+0
-0
async-io-win32.c++
c++/src/kj/async-io-win32.c++
+0
-0
async-io.c++
c++/src/kj/async-io.c++
+8
-4
No files found.
c++/src/capnp/ez-rpc.c++
View file @
505e71f7
...
...
@@ -198,6 +198,19 @@ kj::LowLevelAsyncIoProvider& EzRpcClient::getLowLevelIoProvider() {
// =======================================================================================
namespace
{
class
DummyFilter
:
public
kj
::
LowLevelAsyncIoProvider
::
NetworkFilter
{
public
:
bool
shouldAllow
(
const
struct
sockaddr
*
addr
,
uint
addrlen
)
override
{
return
true
;
}
};
static
DummyFilter
DUMMY_FILTER
;
}
// namespace
struct
EzRpcServer
::
Impl
final
:
public
SturdyRefRestorer
<
AnyPointer
>
,
public
kj
::
TaskSet
::
ErrorHandler
{
Capability
::
Client
mainInterface
;
...
...
@@ -271,7 +284,8 @@ struct EzRpcServer::Impl final: public SturdyRefRestorer<AnyPointer>,
context
(
EzRpcContext
::
getThreadLocal
()),
portPromise
(
kj
::
Promise
<
uint
>
(
port
).
fork
()),
tasks
(
*
this
)
{
acceptLoop
(
context
->
getLowLevelIoProvider
().
wrapListenSocketFd
(
socketFd
),
readerOpts
);
acceptLoop
(
context
->
getLowLevelIoProvider
().
wrapListenSocketFd
(
socketFd
,
DUMMY_FILTER
),
readerOpts
);
}
void
acceptLoop
(
kj
::
Own
<
kj
::
ConnectionReceiver
>&&
listener
,
ReaderOptions
readerOpts
)
{
...
...
c++/src/kj/async-io-unix.c++
View file @
505e71f7
This diff is collapsed.
Click to expand it.
c++/src/kj/async-io-win32.c++
View file @
505e71f7
This diff is collapsed.
Click to expand it.
c++/src/kj/async-io.c++
View file @
505e71f7
...
...
@@ -19,15 +19,18 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
#if _WIN32
// Request Vista-level APIs.
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#endif
#include "async-io.h"
#include "async-io-internal.h"
#include "debug.h"
#include "vector.h"
#if _WIN32
// Request Vista-level APIs.
#define WINVER 0x0600
#define _WIN32_WINNT 0x0600
#include <winsock2.h>
#include <ws2ipdef.h>
#include <ws2tcpip.h>
...
...
@@ -205,7 +208,8 @@ void DatagramPort::setsockopt(int level, int option, const void* value, uint len
Own
<
DatagramPort
>
NetworkAddress
::
bindDatagramPort
()
{
KJ_UNIMPLEMENTED
(
"Datagram sockets not implemented."
);
}
Own
<
DatagramPort
>
LowLevelAsyncIoProvider
::
wrapDatagramSocketFd
(
Fd
fd
,
uint
flags
)
{
Own
<
DatagramPort
>
LowLevelAsyncIoProvider
::
wrapDatagramSocketFd
(
Fd
fd
,
LowLevelAsyncIoProvider
::
NetworkFilter
&
filter
,
uint
flags
)
{
KJ_UNIMPLEMENTED
(
"Datagram sockets not implemented."
);
}
...
...
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