Update soc_u.cpp

This commit is contained in:
Hexagon12 2017-11-04 16:30:48 +02:00 committed by GitHub
parent 5d123144ff
commit 4ded138139
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -780,10 +780,6 @@ static void Connect(Interface* self) {
static void InitializeSockets(Interface* self) {
// TODO(Subv): Implement
#ifdef _WIN32
WSADATA data;
WSAStartup(MAKEWORD(2, 2), &data);
#endif
u32* cmd_buffer = Kernel::GetCommandBuffer();
cmd_buffer[0] = IPC::MakeHeader(1, 1, 0);
@ -900,10 +896,18 @@ const Interface::FunctionInfo FunctionTable[] = {
SOC_U::SOC_U() {
Register(FunctionTable);
#ifdef _WIN32
WSADATA data;
WSAStartup(MAKEWORD(2, 2), &data);
#endif
}
SOC_U::~SOC_U() {
CleanupSockets();
#ifdef _WIN32
WSACleanup();
#endif
}
} // namespace SOC