18 lines
351 B
C
18 lines
351 B
C
#pragma once
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#define URL_PROTOCOL_MAX 20
|
|
#define URL_PATH_MAX 2000
|
|
#define URL_HOST_MAX 260
|
|
|
|
typedef struct lm_url {
|
|
uint16_t port;
|
|
char protocol[URL_PROTOCOL_MAX + 1];
|
|
char *host;
|
|
char *path;
|
|
} lm_url_t;
|
|
|
|
bool lm_url_init(lm_url_t *url, char *str);
|
|
void lm_url_free(lm_url_t *url);
|