diff options
author | wrmr | 2024-11-03 02:48:05 -0500 |
---|---|---|
committer | wrmr | 2024-11-03 02:48:05 -0500 |
commit | 3e9c75318b0eb1114fb7361dbc467990674804b6 (patch) | |
tree | 504efbb2fe56c4700055ec584170cb77237c732a /net.h | |
parent | 610808a5902adad751a4acdbcc310803a51fed5d (diff) |
start working on fetching
Diffstat (limited to 'net.h')
-rw-r--r-- | net.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/net.h b/net.h index 0b4422f..8483120 100644 --- a/net.h +++ b/net.h @@ -1,10 +1,10 @@ #ifndef NET_H #define NET_H -#include "doc.h" +#include "buf.h" -#define HOST_MAX 255 -#define PATH_MAX 255 +#define HOST_MAX 256 +#define PATH_MAX 256 enum protocol { PROT_UNKNOWN, @@ -13,6 +13,13 @@ enum protocol { PROT_GEMINI, }; +enum doc_type { + TYPE_UNKNOWN, + TYPE_GOPHERDOC, + TYPE_GEMTEXT, + TYPE_PLAIN, +}; + struct addr { char host[HOST_MAX]; char path[PATH_MAX]; @@ -22,5 +29,6 @@ struct addr { }; int net_addr(const char *url, struct addr *adr, enum protocol prot_default); +int net_fetch(const struct addr *adr, struct buf *buf); #endif |