2024-06-20 00:34:32 +00:00
|
|
|
#pragma once
|
2024-06-25 18:21:15 +00:00
|
|
|
#include "mptp.h"
|
2024-06-20 00:34:32 +00:00
|
|
|
#include "types.h"
|
2024-06-20 22:36:56 +00:00
|
|
|
#include <stdbool.h>
|
2024-06-25 18:21:15 +00:00
|
|
|
#include <sys/socket.h>
|
|
|
|
|
|
|
|
typedef struct lm_pool_thread_arg {
|
|
|
|
int sock;
|
|
|
|
struct sockaddr addr;
|
|
|
|
lm_mptp_t packet;
|
|
|
|
lm_pool_t *pool;
|
|
|
|
} lm_pool_thread_arg_t;
|
2024-06-20 00:34:32 +00:00
|
|
|
|
2024-06-22 22:55:01 +00:00
|
|
|
lm_pool_t *lm_pool_new(char *name, char *url);
|
|
|
|
void lm_pool_test(lm_pool_t *pool);
|
2024-06-25 18:21:15 +00:00
|
|
|
bool lm_pool_info_load(lm_pool_t *pool, char *file);
|
|
|
|
void lm_pool_info_free(lm_pool_t *pool);
|
2024-06-22 22:55:01 +00:00
|
|
|
void lm_pool_free(lm_pool_t *pool);
|
2024-06-25 18:21:15 +00:00
|
|
|
void lm_pool_serve_thread(void *arg);
|
|
|
|
void lm_pool_serve(lm_pool_t *pool, lm_mptp_t *packet, int sock, struct sockaddr *addr);
|