aboutsummaryrefslogtreecommitdiffstats
path: root/src/protocol.h
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-05 19:48:07 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-02-05 19:48:07 +0300
commitbf6f2838403722ea571daaeec5981831313d474b (patch)
tree25fe553ce04b9f724537364c44889a7d326566b7 /src/protocol.h
parent32a96e82d075bdba6e9e567080977a76830cbce2 (diff)
downloadrspamd-bf6f2838403722ea571daaeec5981831313d474b.tar.gz
rspamd-bf6f2838403722ea571daaeec5981831313d474b.zip
* Add some comments and documentation
Diffstat (limited to 'src/protocol.h')
-rw-r--r--src/protocol.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/protocol.h b/src/protocol.h
index 6c750e91f..600632119 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -8,6 +8,10 @@
#define RSPAMD_PROTOCOL_ERROR 3
#define RSPAMD_LENGTH_ERROR 4
+/**
+ * Rspamd protocol definition
+ */
+
struct worker_task;
enum rspamd_protocol {
@@ -25,7 +29,19 @@ enum rspamd_command {
CMD_PROCESS,
};
+/**
+ * Read one line of user's input for specified task
+ * @param task task object
+ * @param line line of user's input
+ * @return 0 if line was successfully parsed and -1 if we have protocol error
+ */
int read_rspamd_input_line (struct worker_task *task, char *line);
+
+/**
+ * Write reply for specified task command
+ * @param task task object
+ * @return 0 if we wrote reply and -1 if there was some error
+ */
int write_reply (struct worker_task *task);
#endif