diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-05-02 00:00:34 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-05-02 00:00:34 -0400 |
commit | dc9df45dc6578704a367ab6a72842f65b1190f77 (patch) | |
tree | 2ba683aed5e1ba2fa3e72fc9706ad66615cbc336 /include/osm/bind.h | |
parent | aab7fe08faf2aec394174b2ee9782988bfc7fa30 (diff) |
default listen and accept impl
Diffstat (limited to 'include/osm/bind.h')
-rw-r--r-- | include/osm/bind.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/osm/bind.h b/include/osm/bind.h index e1627c6..d56533c 100644 --- a/include/osm/bind.h +++ b/include/osm/bind.h @@ -1,6 +1,9 @@ #ifndef OSM_BIND_H #define OSM_BIND_H +#include <osm/utils.h> +#include <threads.h> + /** * Bind to the next available onboard socket in the given directory * sock_dir - The directory containing osm sockets (or null for the default) @@ -14,4 +17,12 @@ int osm_bind_local(int sockfd, const char *sock_dir); */ int osm_open_onboard(char *sock_dir); +/** + * Listen for socket connections and return the new + * file descriptors to the callback function for processing + * sockfd - the socket file descriptor + * callback - the callback function which will be provided with the new file descriptor + */ +Vector osm_listen_and_accept(int sockfd, thrd_start_t callback); + #endif |