mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-19 22:49:47 +00:00
LibCore: Implement PosixSocketHelper::pending_bytes() on Windows
This commit is contained in:
parent
4d68d28e16
commit
ba15348d56
Notes:
github-actions[bot]
2025-08-07 02:25:53 +00:00
Author: https://github.com/ayeteadoe
Commit: ba15348d56
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 7 additions and 1 deletions
|
@ -112,7 +112,13 @@ ErrorOr<void> PosixSocketHelper::set_receive_timeout(AK::Duration timeout)
|
||||||
|
|
||||||
ErrorOr<size_t> PosixSocketHelper::pending_bytes() const
|
ErrorOr<size_t> PosixSocketHelper::pending_bytes() const
|
||||||
{
|
{
|
||||||
VERIFY(0 && "Core::PosixSocketHelper::pending_bytes is not implemented");
|
if (!is_open()) {
|
||||||
|
return Error::from_windows_error(WSAENOTCONN);
|
||||||
|
}
|
||||||
|
|
||||||
|
int value;
|
||||||
|
TRY(System::ioctl(m_fd, FIONREAD, &value));
|
||||||
|
return static_cast<size_t>(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PosixSocketHelper::setup_notifier()
|
void PosixSocketHelper::setup_notifier()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue