Commit 2e174b22 authored by abyss7's avatar abyss7

Accept `struct sockaddr` as a const pointer.

parent 7aa69c80
...@@ -114,7 +114,7 @@ struct EzRpcClient::Impl { ...@@ -114,7 +114,7 @@ struct EzRpcClient::Impl {
clientContext = kj::heap<ClientContext>(kj::mv(stream)); clientContext = kj::heap<ClientContext>(kj::mv(stream));
}).fork()) {} }).fork()) {}
Impl(struct sockaddr* serverAddress, uint addrSize) Impl(const struct sockaddr* serverAddress, uint addrSize)
: context(EzRpcContext::getThreadLocal()), : context(EzRpcContext::getThreadLocal()),
setupPromise(context->getIoProvider().getNetwork() setupPromise(context->getIoProvider().getNetwork()
.getSockaddr(serverAddress, addrSize)->connect() .getSockaddr(serverAddress, addrSize)->connect()
...@@ -132,7 +132,7 @@ struct EzRpcClient::Impl { ...@@ -132,7 +132,7 @@ struct EzRpcClient::Impl {
EzRpcClient::EzRpcClient(kj::StringPtr serverAddress, uint defaultPort) EzRpcClient::EzRpcClient(kj::StringPtr serverAddress, uint defaultPort)
: impl(kj::heap<Impl>(serverAddress, defaultPort)) {} : impl(kj::heap<Impl>(serverAddress, defaultPort)) {}
EzRpcClient::EzRpcClient(struct sockaddr* serverAddress, uint addrSize) EzRpcClient::EzRpcClient(const struct sockaddr* serverAddress, uint addrSize)
: impl(kj::heap<Impl>(serverAddress, addrSize)) {} : impl(kj::heap<Impl>(serverAddress, addrSize)) {}
EzRpcClient::EzRpcClient(int socketFd) EzRpcClient::EzRpcClient(int socketFd)
......
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