|
Ripples 1.0
High Performant Software Architecture For Transaction Processing
|
#include <arpa/inet.h>#include <assert.h>#include <errno.h>#include <netinet/in.h>#include <stdio.h>#include <stdlib.h>#include <stddef.h>#include <sys/socket.h>#include <unistd.h>#include "config.h"#include "conn.h"#include "constants.h"#include "lru_cache.h"#include "query.h"#include "utils.h"
Copyright (c) 2025 Faruk Grozdanic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
static |
Function returns string matching a listener error enumerated by listener_start_error_t.
| err | ID to return string message for. |

|
static |
Start a TCP or UDP DNS listener.
Starts a listener for given IP family and protocol. Socket is created and socket options set. If protocol is TCP listen() is called to start listening for new TCP connections on socket.
| cfg | Configuration object that has settings:
|
| family | IP family to start a listener for, valid options are:
|
| protocol | Protocol to start listener for, valid options are:
|
| err_no | Where to store value of errno if error was encountered. |
