summaryrefslogtreecommitdiff
path: root/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'net.h')
-rw-r--r--net.h14
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