mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 22:49:47 +00:00
LibCore: Implement PosixSocketHelper::set_receive_timeout() on Windows
This commit is contained in:
parent
79594279da
commit
4d68d28e16
Notes:
github-actions[bot]
2025-08-07 02:25:59 +00:00
Author: https://github.com/ayeteadoe
Commit: 4d68d28e16
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5435
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/R-Goc
1 changed files with 6 additions and 0 deletions
|
@ -104,6 +104,12 @@ ErrorOr<void> PosixSocketHelper::set_close_on_exec(bool enabled)
|
|||
return System::set_close_on_exec(m_fd, enabled);
|
||||
}
|
||||
|
||||
ErrorOr<void> PosixSocketHelper::set_receive_timeout(AK::Duration timeout)
|
||||
{
|
||||
auto timeout_spec = timeout.to_timespec();
|
||||
return System::setsockopt(m_fd, SOL_SOCKET, SO_RCVTIMEO, &timeout_spec, sizeof(timeout_spec));
|
||||
}
|
||||
|
||||
ErrorOr<size_t> PosixSocketHelper::pending_bytes() const
|
||||
{
|
||||
VERIFY(0 && "Core::PosixSocketHelper::pending_bytes is not implemented");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue