Commit 7aa69c80 authored by abyss7's avatar abyss7

Provide forward declaration for `struct sockaddr`

Otherwise, at least clang++, forward-declares it inside the namespace `::capnp` and doesn't match it with a real `struct sockaddr` from the header 'socket.h'.

Also, accept `const` pointer - there is no point not to do so.
parent 026b8294
......@@ -26,6 +26,8 @@
#include "rpc.h"
struct sockaddr;
namespace kj { class AsyncIoProvider; class LowLevelAsyncIoProvider; }
namespace capnp {
......@@ -102,7 +104,7 @@ public:
// The address is parsed by `kj::Network` in `kj/async-io.h`. See that interface for more info
// on the address format, but basically it's what you'd expect.
EzRpcClient(struct sockaddr* serverAddress, uint addrSize);
EzRpcClient(const struct sockaddr* serverAddress, uint addrSize);
// Like the above constructor, but connects to an already-resolved socket address. Any address
// format supported by `kj::Network` in `kj/async-io.h` is accepted.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment