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

LibCore: Add a way to mark a socket as blocking (or not)

If custom I/O is being done outside CIODevice, we need a way to force blocking sometimes.
This also fixes the default of CLocalSocket to be non-blocking, the same
as CTCPSocket.
This commit is contained in:
Robin Burchell 2019-07-16 18:00:08 +02:00 committed by Andreas Kling
parent 6aa77d1999
commit a714fc661d
3 changed files with 15 additions and 1 deletions

View file

@ -23,6 +23,7 @@ public:
bool send(const ByteBuffer&);
bool is_connected() const { return m_connected; }
void set_blocking(bool blocking);
CSocketAddress source_address() const { return m_source_address; }
int source_port() const { return m_source_port; }