diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-25 14:43:40 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-25 14:43:40 +0000 |
commit | 6141a5694842f6ba9588eae5cc7cddb10830b9e6 (patch) | |
tree | ed872a99e0e428ef350b1dc1b089359d51a72ecf /src/libserver/rspamd_control.h | |
parent | 840f144b9d399d69f06c921f23e36c13d0b498ff (diff) | |
download | rspamd-6141a5694842f6ba9588eae5cc7cddb10830b9e6.tar.gz rspamd-6141a5694842f6ba9588eae5cc7cddb10830b9e6.zip |
Add method to send data to server pipe.
Diffstat (limited to 'src/libserver/rspamd_control.h')
-rw-r--r-- | src/libserver/rspamd_control.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/libserver/rspamd_control.h b/src/libserver/rspamd_control.h index 24874e785..5e8497a0a 100644 --- a/src/libserver/rspamd_control.h +++ b/src/libserver/rspamd_control.h @@ -104,6 +104,10 @@ typedef gboolean (*rspamd_worker_control_handler) (struct rspamd_main *rspamd_ma struct rspamd_control_command *cmd, gpointer ud); +typedef void (*rspamd_srv_reply_handler) (struct rspamd_worker *worker, + struct rspamd_srv_reply *rep, gint rep_fd, + gpointer ud); + /** * Process client socket connection */ @@ -127,7 +131,16 @@ void rspamd_control_worker_add_cmd_handler (struct rspamd_worker *worker, /** * Start watching on srv pipe */ -void rspamd_main_start_watching (struct rspamd_worker *worker, +void rspamd_srv_start_watching (struct rspamd_worker *worker, struct event_base *ev_base); + +/** + * Send command to srv pipe and read reply calling the specified callback at the + * end + */ +void rspamd_srv_send_command (struct rspamd_worker *worker, + struct event_base *ev_base, + struct rspamd_srv_command *cmd, + rspamd_srv_reply_handler handler, gpointer ud); #endif |