summaryrefslogtreecommitdiffstats
path: root/src/shared/sockhelper.c
Commit message (Collapse)AuthorAgeFilesLines
* [SHARED] sock_printable: Always null-terminateSimon Rettberg2023-02-121-1/+4
|
* [SERVER] Set TCP_NODELAY on outgoing connectionsSimon Rettberg2021-04-141-1/+4
| | | | | | | This will send all (block) requests immediately at sometimes more overhead, but slighly less delays. Since the outgoing connection on a client is only used very lightly, this tradeoff should always make sense.
* [BUILD] fixes issues to build user space programs on FreeBSD 12.1Manuel Bentele2020-10-191-1/+1
|
* [BUILD] rewrite CMake build system to track changes of source filesManuel Bentele2020-10-161-12/+8Star
| | | | | | | | | | This change restructures the source code directories, separates shared form non-shared application code and adds CMake dependencies. These dependencies allow the tracking of changes and trigger a rebuild of those build targets where changed files are involved. WARNING: Note that the support of the DNBD3_SERVER_AFL build option is not supported yet. Thus, the option should be never turned on.
* Merge branch 'no-working-flag' into fuse_llSimon Rettberg2020-07-271-1/+9
|\
| * [SHARED] connect_ms might change above, don't checkSimon Rettberg2020-03-231-1/+1
| |
| * [SHARED] Better errno handling in connect() helperSimon Rettberg2019-08-151-0/+8
| |
* | [SHARED] Fix: connect with timeout returns socket handle on EINPROGRESSSimon Rettberg2020-07-211-1/+1
|/ | | | | | Only if we request non-blocking connect (connect_ms == -1) this function should return a socket fd that is not actually connected. Otherwise, consder this a failure, close the sock fd, and return -1.
* [SHARED] Add sockaddr2dnbd3 func, add multiConnect func, EINTR handlingSimon Rettberg2017-11-061-26/+119
| | | | | | | | | | EINTR was apparently not handled properly on non-linux for the connect() syscall. sockaddr2dnbd3 is what resolveToDnbd3Host already did internally, now it's its own function. sock_multiConnect() is a wrapper around connect() and poll, making it easy to connect to multiple hosts in a cascaded manner, with a slight delay between connect calls.
* [*] Mark logadd() as printf-style function, fix errors that it revealedSimon Rettberg2017-10-311-1/+1
| | | | ...there were quite a few format string errors as it turns out :/
* [*] Introduce constants for IPv4/6 in dnbd3_host_tSimon Rettberg2017-10-281-7/+6Star
| | | | | | | AF_INET luckily was "2" on all platforms checked, so no problems there with interoperation, but AF_INET6 is different between Linux, BSD, Windows and possibly others, so map back and forth between AF_INET/AF_INET6 and HOST_IP4/HOST_IP6 to fix this.
* [SERVER] Fix types or add explicit casts everywhere we might have type ↵Simon Rettberg2017-10-241-8/+11
| | | | conversion problems
* [*] constness for sock_sendAll paramsSimon Rettberg2017-10-011-2/+2
|
* cleanup commitsSebastian2016-02-111-3/+0Star
|
* [SERVER] Fix a lot of (mostly harmless) data racesSimon Rettberg2016-01-111-1/+1
|
* [SERVER] Remove non-working images from list, plus refactoringSimon Rettberg2015-12-151-1/+1
| | | | | | | | | | Now that we can automatically load unknown images from disk on request, it makes sense to remove non-working images from the image list. On future requests, we will look for them on disk again, which is nice in case of temporary storage hickups. Also, some more ore less related locking has been refined (loading images, replicating images)
* [FUSE] Add virtual status fileSimon Rettberg2015-12-021-3/+36
|
* [FUSE] Stability improvements, runs for longer than a couple secs now :)Simon Rettberg2015-12-011-3/+20
|
* [FUSE] It works! Kinda...Simon Rettberg2015-11-301-3/+4
|
* [FUSE] Compiles againSimon Rettberg2015-11-301-4/+4
|
* [FUSE] Mid-refactoring, does not compileSimon Rettberg2015-11-241-0/+287