[mammoth] Update EndpointServer to have move-only semantics.

This commit is contained in:
Drew Galbraith 2023-06-26 11:38:17 -07:00
parent 16c30d12fb
commit 2e89aee5a3
8 changed files with 40 additions and 29 deletions

View file

@ -28,11 +28,12 @@ uint64_t main(uint64_t init_port_cap) {
auto resp_cap = resp_cap_or.value();
PortClient notify = PortClient::AdoptPort(resp_cap.second());
ASSIGN_OR_RETURN(EndpointServer endpoint, EndpointServer::Create());
ASSIGN_OR_RETURN(EndpointClient client, endpoint.CreateClient());
ASSIGN_OR_RETURN(glcr::UniquePtr<EndpointServer> endpoint,
EndpointServer::Create());
ASSIGN_OR_RETURN(EndpointClient client, endpoint->CreateClient());
notify.WriteMessage("denali", client.GetCap());
DenaliServer server(endpoint, driver);
DenaliServer server(glcr::Move(endpoint), driver);
RET_ERR(server.RunServer());
// FIXME: Add thread join.
return 0;