htc: implement socket driver (socket api not really impl'd yet)

This commit is contained in:
Michael Scire
2021-02-24 01:45:55 -08:00
committed by SciresM
parent b5ab491603
commit 1c974a387c
31 changed files with 1389 additions and 35 deletions

View File

@@ -39,6 +39,8 @@ namespace ams::mitm::socket::resolver {
virtual Result OnNeedsToAccept(int port_index, Server *server) override;
};
alignas(os::MemoryPageSize) constinit u8 g_resolver_allocator_buffer[16_KB];
ServerManager g_server_manager;
Result ServerManager::OnNeedsToAccept(int port_index, Server *server) {
@@ -121,6 +123,9 @@ namespace ams::mitm::socket::resolver {
return;
}
/* Initialize the socket allocator. */
ams::socket::InitializeAllocatorForInternal(g_resolver_allocator_buffer, sizeof(g_resolver_allocator_buffer));
/* Initialize debug. */
resolver::InitializeDebug(ShouldEnableDebugLog());