1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

Kernel: Prepare Socket for becoming a File.

Make the Socket functions take a FileDescriptor& rather than a socket role
throughout the code. Also change threads to block on a FileDescriptor,
rather than either an fd index or a Socket.
This commit is contained in:
Andreas Kling 2019-05-03 20:15:54 +02:00
parent 9f633a1871
commit 03da7046bd
14 changed files with 118 additions and 115 deletions

View file

@ -34,7 +34,7 @@ private:
virtual int protocol_receive(const ByteBuffer&, void* buffer, size_t buffer_size, int flags, sockaddr* addr, socklen_t* addr_length) override;
virtual int protocol_send(const void*, int) override;
virtual KResult protocol_connect(ShouldBlock) override;
virtual KResult protocol_connect(FileDescriptor&, ShouldBlock) override;
virtual int protocol_allocate_source_port() override;
virtual bool protocol_is_disconnected() const override;