Generalize the EndpointServer to require less boilerplate.
Classes can now inherit from the EndpointServer and just implement the HandleRequest function.
This commit is contained in:
parent
847d37addc
commit
caccb08e16
14 changed files with 215 additions and 147 deletions
|
|
@ -13,16 +13,15 @@ uint64_t main(uint64_t port_cap) {
|
|||
check(ParseInitPort(port_cap));
|
||||
|
||||
ASSIGN_OR_RETURN(auto server, YellowstoneServer::Create());
|
||||
Thread server_thread = server->RunServer();
|
||||
Thread registration_thread = server->RunRegistration();
|
||||
|
||||
uint64_t vaddr;
|
||||
check(ZAddressSpaceMap(gSelfVmasCap, 0, gBootDenaliVmmoCap, &vaddr));
|
||||
ASSIGN_OR_RETURN(glcr::UniquePtr<EndpointClient> client,
|
||||
server->GetServerClient());
|
||||
server->CreateClient());
|
||||
check(SpawnProcessFromElfRegion(vaddr, glcr::Move(client)));
|
||||
|
||||
check(server_thread.Join());
|
||||
check(server->RunServer());
|
||||
check(registration_thread.Join());
|
||||
dbgln("Yellowstone Finished Successfully.");
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue