[mammoth] Finish separating PortServer and PortClient.
This commit is contained in:
parent
5fb9fa6ae6
commit
b7a962cc26
10 changed files with 66 additions and 60 deletions
|
|
@ -12,9 +12,11 @@ PortServer PortServer::AdoptCap(z_cap_t cap) { return PortServer(cap); }
|
|||
|
||||
PortServer::PortServer(z_cap_t port_cap) : port_cap_(port_cap) {}
|
||||
|
||||
glcr::ErrorCode PortServer::CreateClient(z_cap_t *new_port) {
|
||||
glcr::ErrorOr<PortClient> PortServer::CreateClient() {
|
||||
// FIXME: Restrict permissions.
|
||||
return ZCapDuplicate(port_cap_, new_port);
|
||||
z_cap_t new_port;
|
||||
RET_ERR(ZCapDuplicate(port_cap_, &new_port));
|
||||
return PortClient::AdoptPort(new_port);
|
||||
}
|
||||
|
||||
glcr::ErrorCode PortServer::RecvCap(uint64_t *num_bytes, char *msg,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue