1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-06 14:37:36 +00:00

Kernel: More work on sockets. Fleshing out connect().

This commit is contained in:
Andreas Kling 2019-02-14 15:55:19 +01:00
parent b12ab1270a
commit b20a7aca61
7 changed files with 90 additions and 4 deletions

View file

@ -4,6 +4,7 @@
#include <LibC/errno_numbers.h>
#include "FileSystem.h"
#include "MemoryManager.h"
#include <Kernel/LocalSocket.h>
static dword s_lastFileSystemID;
static HashMap<dword, FS*>* s_fs_map;
@ -152,3 +153,17 @@ void Inode::set_vmo(VMObject& vmo)
{
m_vmo = vmo.make_weak_ptr();
}
bool Inode::bind_socket(LocalSocket& socket)
{
ASSERT(!m_socket);
m_socket = socket;
return true;
}
bool Inode::unbind_socket()
{
ASSERT(m_socket);
m_socket = nullptr;
return true;
}