Sergi Vladykin
611a97d9d9
Edge-Triggered mode for sc_sock ( #97 )
...
Added SC_SOCK_EDGE for edge-triggered mode
2022-09-11 04:39:54 +03:00
Ozan Tezcan
53d4a9158a
Fix compiler warnings ( #95 )
...
Fix compiler warnings
2022-08-20 18:56:21 +03:00
Ozan Tezcan
eb751789eb
sc_array: Include string.h for memmove() ( #93 )
...
sc_array: Include string.h for memmove()
This is just to silence compiler warning for mingw build
2022-08-13 13:43:01 +03:00
Sergi Vladykin
0b74cbcb2e
sc_sock: Linux to Windows cross-compilation ( #88 )
...
Fix to support build with MinGW-w64
2022-07-26 10:25:44 +03:00
Sergi Vladykin
a770ca3e5a
Function sc_sock_connect() picks wrong address faimily ( #87 )
...
Prefer same family addresses in sc_sock_connect()
Connecting in non-blocking mode `AF_INET6` socket with `sc_sock_connect("localhost")` where both IPv4 and IPv6 addresses are assigned to "localhost" but the server listens on IPv6 only.
It fails with `Connection refused` because `getaddrinfo` looks for any available address with `AF_UNSPEC` and wrongly picks IPv4. And since it is non-blocking mode it can not retry after the failure.
This change makes `sc_sock_connect()` give more respect to the configured socket family: the first iteration we try to connect to addresses with the matching family, the second iteration we try to connect to the rest.
Co-authored-by: Ozan Tezcan <ozantezcan@gmail.com>
2022-07-26 08:52:36 +03:00
Sergi Vladykin
871e848045
Fix error propagation ( #86 )
...
Fix error propagation for getsockopt
2022-07-25 10:20:46 +03:00
Ozan Tezcan
3085b274e3
Avoid possible slicing in timer ( #85 )
2022-07-16 03:29:01 +03:00
Ozan Tezcan
3b9ec1001e
Fix map iteration ( #84 )
...
Fix map loop with break statements
2022-07-16 03:11:47 +03:00
Sergi Vladykin
c87e906f9f
Fix warning for sc_sock on Windows ( #83 )
...
It should be `u_long` instead of `int` : https://docs.microsoft.com/en-us/windows/win32/api/winsock/nf-winsock-ioctlsocket
2022-06-22 09:34:50 +03:00
Ozan Tezcan
3a251b456e
Fix minor issues in sc_array ( #82 )
...
* Fix unnecessary memory allocation after sc_array_clear()
* Fix assert side effect in sc_array
2022-06-05 14:54:10 +03:00
Ozan Tezcan
020f6f740d
Fix build ( #79 )
...
Fix build
2022-02-05 00:11:52 +03:00
tezc
89f51f1d87
queue unsigned long long
2022-02-04 22:44:53 +03:00
tezc
9c9ab9d9c9
map doc
2022-02-04 22:43:15 +03:00
tezc
145f8fbfc0
CRC32c doc
2022-02-04 22:32:17 +03:00
tezc
a872396ef7
Condition doc
2022-02-04 22:24:02 +03:00
tezc
cb178289d5
Doc and add unsigned long long to array
2022-02-04 22:20:04 +03:00
tezc
70a432412b
Expand buf capacity to 2^64
2022-02-04 22:16:08 +03:00
Ozan Tezcan
ba1f378b95
Merge pull request #78 from tezc/doc-fix
...
Doc fix
2021-07-18 20:08:43 +03:00
tezc
781813da4c
Doc change
2021-07-18 20:06:50 +03:00
tezc
d442ed05ae
Doc change
2021-07-18 20:01:33 +03:00
Ozan Tezcan
50e594d0bd
Update sc_mmap.c
...
sc_mmap, fixed address calculation for msync
2021-05-15 15:59:54 +03:00
Ozan Tezcan
a2f9590038
Merge pull request #77 from tezc/mmap-align
...
auto align msync addr to multiple of OS page size
2021-05-15 15:45:11 +03:00
tezc
fb59e9db3b
auto align msync addr to multiple of OS page size
2021-05-15 15:31:10 +03:00
Ozan Tezcan
a48de52daf
Merge pull request #76 from tezc/fix-m1-signal
...
get backtrace pointer for only MAC_OS_X_VERSION_10_6
2021-05-15 15:07:09 +03:00
tezc
1901bc7c76
get backtrace pointer for only MAC_OS_X_VERSION_10_6
2021-05-15 14:39:51 +03:00
Ozan Tezcan
17973df076
Merge pull request #75 from tezc/fix
...
Fix
2021-05-13 17:49:02 +03:00
tezc
92fcd6b09b
fix sock fail test
2021-05-13 17:02:36 +03:00
tezc
27a370071b
cancelled setting buffer size of a socket
2021-05-13 16:54:25 +03:00
tezc
b78f0b7000
made pow2 functions operate on uint64_t instead of size_t
2021-05-13 16:53:22 +03:00
Ozan Tezcan
57d9fbc07e
readme fix : array, queue, map ( #74 )
...
timer init fix, buf zero len memcpy check
2021-05-09 12:09:09 +03:00
tezc
0943d1f778
readme fix : array, queue, map
2021-05-04 00:00:44 +03:00
tezc
8d21bf2f3b
readme update
2021-05-03 03:06:26 +03:00
tezc
845c1e08e6
readme update
2021-05-03 03:01:00 +03:00
Ozan Tezcan
8e8b7d6b64
Merge pull request #73 from tezc/v2
...
V2
2021-05-03 02:58:13 +03:00
tezc
8e48d260de
revert sc_map api, fix sc_array sort
2021-05-01 02:19:39 +03:00
tezc
76641ccebf
ubuntu 32 bit support on 64 bit
2021-04-27 21:27:29 +03:00
tezc
f3f91805af
ubuntu 32 bit support on 64 bit
2021-04-27 21:17:43 +03:00
tezc
796bd45663
more 32 bit tests, doc fix
2021-04-27 21:13:23 +03:00
tezc
62001ca6fc
sc_sock : fixed freebsd retcode
2021-04-27 20:44:34 +03:00
tezc
0f1fac7099
license change, refactor sc_sock, sc_map v2
2021-04-27 20:19:25 +03:00
tezc
a73fbcc74f
refactor map, array and added queue test
2021-04-26 23:08:38 +03:00
tezc
05a72dd46b
sc_map v2 - test and doc
2021-04-26 23:00:50 +03:00
tezc
3150369d7a
sc_map v2
2021-04-26 22:04:29 +03:00
tezc
cce603126f
queue and array v2
2021-04-26 20:33:38 +03:00
tezc
3c8e0f9f70
sc_sock windows : don't try to set non-existing fds
2021-04-15 01:41:55 +03:00
tezc
9250f22d7c
sc_sock windows, move Ws2tcpip.h in front of windows.h
2021-04-15 01:36:48 +03:00
tezc
c3010e0d12
do not override error message on _term family functions + clang-format
2021-04-15 01:30:58 +03:00
tezc
d1a7e421ad
more poll_term tests
2021-04-15 00:20:36 +03:00
tezc
7af766e1d5
save error message if close on sock_poll fails
2021-04-15 00:12:09 +03:00
tezc
e39a8fb2d2
fix windows sc_cond
2021-04-14 23:30:54 +03:00