Commit graph

7 commits

Author SHA1 Message Date
Andrew Kaster
25f00b2486 LibCore: Add missing HashMap include to Windows EventLoop 2025-02-11 01:41:46 -07:00
stasoid
26825b5865 LibCore: Properly shutdown a socket on Windows
It fixes a bug in which ImageDecoder and RequestServer
do not exit because their connections don't close.

This makes the shutdown behavior match the Linux version,
which receives FD_READ | FD_HANGUP on socket close, and
TransportSocket::read_as_much_as_possible_without_blocking calls
schedule_shutdown when read from a socket returns 0 bytes.

On Windows, we have to explicitly call WIN32 shutdown to receive
notification FD_CLOSE.
2025-02-10 12:46:25 -07:00
stasoid
b77016cc34 LibCore: Consistently treat file descriptors as handles on Windows
Also:
 * implement dup and is_socket
 * implement and call init_crt_and_wsa
2025-02-05 19:27:47 -07:00
Lucas CHOLLET
e015a43b51 LibCore: Remove unused methods from EventLoop 2025-01-30 15:34:02 -07:00
stasoid
49bdda1475 AK: Simplify usage of windows.h and winsock2.h
Use <AK/Windows.h> instead of windows.h/winsock2.h
to avoid timeval-related errors.

Note: winsock2.h includes windows.h
2025-01-02 10:17:51 -07:00
R-Goc
579484e065 LibCore: Fix compilation of EventLoopImplementationWindows.cpp 2024-12-20 13:57:43 +01:00
stasoid
1c77135948 LibCore: Port EventLoop to Windows 2024-11-14 11:18:38 -07:00