summaryrefslogtreecommitdiffstats
path: root/include/net.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net.h')
-rw-r--r--include/net.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/net.h b/include/net.h
index 34f557a..6860455 100644
--- a/include/net.h
+++ b/include/net.h
@@ -33,9 +33,21 @@ enum response {
TMPFILE,
};
-
+/**
+ * Initialises connection with daemon and returns a network descriptor.
+ */
int net_init(const unsigned short int port);
+
+/**
+ * Closes connection associated with network descriptor.
+ */
int net_close(int nd);
+
+/**
+ * Get last data received from connection associated with network descriptor.
+ * Function mallocates a buffer for data received from packet. Don't forget to
+ * free the buffer.
+ */
int net_getlastdata(int nd, char * const data);
#endif /* NET_H_INCLUDED */