Ozan Tezcan
d678dd2f0b
sc_sock: Add mask test ( #104 )
...
sc_sock: Add mask test
2023-05-01 22:22:48 +03:00
Ozan Tezcan
c2e8d56e76
Fix linter warnings ( #114 )
2023-04-21 00:43:26 +03:00
Ozan Tezcan
1bb8296eca
doc: Minor fixes
2023-03-19 21:53:57 +03:00
Sergi Vladykin
8d01854232
sc_sock: multithreaded accept ( #100 )
...
Server socket registered in multiple sc_sock_poll instances and
multiple poller threads try to accept an incoming connection.
2022-12-07 11:14:48 +03:00
Sergi Vladykin
54984f40e1
sc_sock_poll thread safety ( #99 )
...
sc_sock_poll thread safety
2022-12-04 22:42:02 +03:00
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
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
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
020f6f740d
Fix build ( #79 )
...
Fix build
2022-02-05 00:11:52 +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
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
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
13a8284383
made sc_sock_poll sc_sock_pipe and cond immune to double termination
2021-04-14 23:24:43 +03:00
tezc
e1ef96ad61
made sc_sock_poll sc_sock_pipe and cond immune to double termination
2021-04-14 23:16:36 +03:00
tezc
286379b0b2
bump version to 2.0.0
2021-04-13 22:36:50 +03:00
Ozan Tezcan
e8f896f077
refactor ( #67 )
...
* refactor
2021-04-07 04:55:05 +03:00
Ozan Tezcan
c221478638
Switched to tabs for indentation, amalgamation tool works with tabs only ( #66 )
...
* Switched to tabs for indentation, amalgamation tool works with tabs only
2021-04-07 00:28:50 +03:00
Ozan Tezcan
31e57ced65
use include <poll.h> instead <sys/poll.h>
2021-03-09 21:32:35 +03:00
Ozan Tezcan
b79c8c71a9
add systemd helper ( #58 )
...
* add systemd helper
2021-03-08 07:39:26 +03:00
Tezc
e6c0c88dff
clang-tidy ( #55 )
...
* clang-tidy
2021-02-24 18:37:21 +03:00
Tezc
ab8abe49f8
test ( #53 )
...
* test
2021-02-19 05:20:07 +03:00
Tezc
fb94efca1b
test ( #50 )
...
* test
2021-02-17 20:04:08 +03:00
Rafael Delboni
dbfc70491c
Option to turn off tests in the build ( #42 )
...
* feat: Option to turn of tests
* feat: Option to turn of tests
* fix: Removes test check on coverage
* docs: Force update options cache
2021-02-14 19:49:21 +03:00
tezc
10dc07669a
crc32 hardware, sock startup/cleanup
2021-02-14 16:29:50 +03:00
tezc
711a548cec
add version
2021-02-14 16:19:26 +03:00
Rafael Delboni
553bbc5069
fix: Changes executables to shared libraries
2021-02-13 21:54:31 -03:00
tezc
15ca058703
XOPEN_SOURCE check
2021-02-10 21:33:03 +03:00
tezc
3a211cce08
connect test
2021-02-08 23:10:45 +03:00
Tezc
488f63265a
map,sock,str tests ( #33 )
...
* map, sock tests
2021-02-08 23:01:44 +03:00
tezc
b6889914fd
fix warnings
2021-02-07 22:36:57 +03:00
tezc
b51d81eb33
fix warnings
2021-02-07 22:31:04 +03:00
Tezc
166767be1e
sock, uri, sc tests ( #32 )
...
* test fix, config.h
2021-02-07 20:42:08 +03:00
tezc
1492eb9c09
errno fixes, docs
2021-02-06 21:36:18 +03:00
Tezc
3a78b0ed2b
doc ( #31 )
2021-02-05 20:46:59 +03:00
Tezc
35fe96f0b0
doc fix ( #30 )
...
uri test, doc, posix define
2021-02-05 16:35:10 +03:00
Tezc
b45bd1b383
doc ( #28 )
...
* doc
2021-02-04 11:17:43 +03:00
Tezc
880290bffc
Doc ( #27 )
...
* doc
2021-02-04 02:35:34 +03:00
Tezc
e357ed8d06
doc ( #26 )
...
* doc
2021-02-03 08:09:50 +03:00
tezc
f3b3d66be0
sock-test
2021-02-01 07:11:12 +03:00
tezc
1e6f2d3fa3
more tests
2021-01-31 02:52:06 +03:00