summaryrefslogtreecommitdiffstats
path: root/src/socket.c
AgeCommit message (Collapse)AuthorFilesLines
2025-02-13socket: Allow setting debug level via environment variableGravatar Nikias Bassen1-0/+4
The value of SOCKET_DEBUG is read once during initialization (library constructor) and is expected to be a numerical value.
2025-02-13socket: WIN32: Make sure errno is set in error conditionsGravatar Nikias Bassen1-0/+9
2025-02-13socket: Update inline attributes for gcc/clangGravatar Nikias Bassen1-1/+1
2025-02-13socket: WIN32: call WSAInit from library constructorGravatar Nikias Bassen1-35/+11
2025-02-13socket: Improve error message output/verbose loggingGravatar Nikias Bassen1-73/+112
This will make sure to not print anything by default. Verbosity needs to be at least 1 and can be set using socket_set_verbose().
2024-11-28Fix compilation on MSVCGravatar Duncan Ogilvie1-3/+11
2024-11-26Change WIN32 to _WIN32 to check if running on WindowsGravatar Duncan Ogilvie1-21/+21
2024-10-29socket.c: define AI_NUMERICSERV if undefinedGravatar Sergey Fedorov1-0/+4
2024-10-21socket/win32: Use calloc where applicable in getifaddrs implementationGravatar Nikias Bassen1-4/+3
This should prevent crashes like the one mentioned in #12 which are caused by releasing an invalid pointer (due to uninitialized memory).
2024-10-09socket: Remove greater-than check for scope_id since they might not be in orderGravatar Nikias Bassen1-10/+0
Otherwise the scope_id matching might exit the loop before reaching the interface with the actual corresponding scope_id. This only affected socket_connect_addr().
2024-05-13socket: Create an IPv4 compatible IPv6 socket when NULL is passed to ↵Gravatar Nikias Bassen1-1/+2
socket_create
2024-05-04socket: Haiku compilation fixesGravatar Jerome Duval1-3/+5
- link against libnetwork - get_primary_mac_address similar to FreeBSD
2024-03-06socket: Make sure errno is always set on error, and always return a ↵Gravatar Nikias Bassen1-5/+97
meaningful error code
2024-02-16socket: Allow NULL as address for socket_create() and socket_connect()Gravatar Nikias Bassen1-8/+0
This will connect to localhost without the need to specify localhost or 127.0.0.1 or ::1 and also makes this invulnerable to DNS rebind attacks.
2024-01-30Move LIMD_GLUE_API definitions to public headersGravatar Nikias Bassen1-17/+17
2023-12-26socket: Conditionally compile using poll or select based on availabilityGravatar Nikias Bassen1-27/+85
2023-12-26socket: Fix select failing when the process has many file descriptors by ↵Gravatar messi1-79/+100
using poll instead This happens, for example, when a process links with libusbmuxd, and the process is file descriptor heavy. Note: 'poll' means the syscall poll, not a polling approach. This patch does not add a busy wait and is not a performance regression.
2023-01-09Fix compilation on cygwinGravatar Josef Micka1-0/+6
2022-03-29socket: Add socket_get_socket_port functionGravatar Nikias Bassen1-0/+21
2021-11-24socket: Add FreeBSD supprt to get_primary_mac_addressGravatar Cameron Katri1-2/+6
2021-06-07socket: Add get_primary_mac_address()Gravatar Nikias Bassen1-0/+62
2021-06-07Initial check-in of sourcesGravatar Nikias Bassen1-0/+1169