mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
IPv4: Rename source/destination in socket classes to local/peer.
It was way too ambiguous who's the source and who's the destination, and it didn't really follow a logical pattern. "Local port" vs "Peer port" is super obvious, so let's call it that.
This commit is contained in:
parent
780d2a08c4
commit
5e938868a2
7 changed files with 80 additions and 88 deletions
|
@ -9,17 +9,17 @@ public:
|
|||
static Retained<UDPSocket> create(int protocol);
|
||||
virtual ~UDPSocket() override;
|
||||
|
||||
static Lockable<HashMap<word, UDPSocket*>>& sockets_by_port();
|
||||
static UDPSocketHandle from_port(word);
|
||||
|
||||
private:
|
||||
explicit UDPSocket(int protocol);
|
||||
virtual const char* class_name() const override { return "UDPSocket"; }
|
||||
static Lockable<HashMap<word, UDPSocket*>>& sockets_by_port();
|
||||
|
||||
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(FileDescriptor&, ShouldBlock) override { return KSuccess; }
|
||||
virtual int protocol_allocate_source_port() override;
|
||||
virtual int protocol_allocate_local_port() override;
|
||||
virtual KResult protocol_bind() override;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue