mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 23:58:11 +00:00
IPv4: Sockets should say can_read() after reading is shut down
This allows clients to get their EOF after shutting down reading.
This commit is contained in:
parent
228a1e9099
commit
3891e6d739
2 changed files with 8 additions and 0 deletions
|
@ -505,3 +505,9 @@ void IPv4Socket::close()
|
|||
{
|
||||
shutdown(SHUT_RDWR);
|
||||
}
|
||||
|
||||
void IPv4Socket::shut_down_for_reading()
|
||||
{
|
||||
Socket::shut_down_for_reading();
|
||||
m_can_read = true;
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ protected:
|
|||
virtual int protocol_allocate_local_port() { return 0; }
|
||||
virtual bool protocol_is_disconnected() const { return false; }
|
||||
|
||||
virtual void shut_down_for_reading() override;
|
||||
|
||||
void set_local_address(IPv4Address address) { m_local_address = address; }
|
||||
void set_peer_address(IPv4Address address) { m_peer_address = address; }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue