summaryrefslogtreecommitdiffstats
path: root/tcpclt.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-06-09 12:40:54 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-06-09 12:40:54 +0200
commit55e01da2ec3de1b5c6b15e4154235f0eedbb68da (patch)
treefe7b9b9b114c982d1453a363499bad9fa323fd1a /tcpclt.h
parentcf51333f7617e586ca1d4cf5202e3d42f14c96ea (diff)
downloadrsyslog-55e01da2ec3de1b5c6b15e4154235f0eedbb68da.tar.gz
rsyslog-55e01da2ec3de1b5c6b15e4154235f0eedbb68da.tar.xz
rsyslog-55e01da2ec3de1b5c6b15e4154235f0eedbb68da.zip
somewhat improved plain tcp syslog reliability
...by doing a connection check before sending. Credits to Martin Schuette for providing the idea. Details are available at http://blog.gerhards.net/2008/06/reliable-plain-tcp-syslog-once-again.html
Diffstat (limited to 'tcpclt.h')
-rw-r--r--tcpclt.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tcpclt.h b/tcpclt.h
index b7aada65..1d704044 100644
--- a/tcpclt.h
+++ b/tcpclt.h
@@ -33,6 +33,7 @@ typedef struct tcpclt_s {
BEGINobjInstance; /**< Data to implement generic object - MUST be the first data element! */
TCPFRAMINGMODE tcp_framing;
char *prevMsg;
+ short bResendLastOnRecon; /* should the last message be resent on a successful reconnect? */
size_t lenPrevMsg;
/* session specific callbacks */
rsRetVal (*initFunc)(void*);
@@ -49,12 +50,13 @@ BEGINinterface(tcpclt) /* name must also be changed in ENDinterface macro! */
int (*Send)(tcpclt_t *pThis, void*pData, char*msg, size_t len);
int (*CreateSocket)(struct addrinfo *addrDest);
/* set methods */
+ rsRetVal (*SetResendLastOnRecon)(tcpclt_t*, int);
rsRetVal (*SetSendInit)(tcpclt_t*, rsRetVal (*)(void*));
rsRetVal (*SetSendFrame)(tcpclt_t*, rsRetVal (*)(void*, char*, size_t));
rsRetVal (*SetSendPrepRetry)(tcpclt_t*, rsRetVal (*)(void*));
rsRetVal (*SetFraming)(tcpclt_t*, TCPFRAMINGMODE framing);
ENDinterface(tcpclt)
-#define tcpcltCURR_IF_VERSION 1 /* increment whenever you change the interface structure! */
+#define tcpcltCURR_IF_VERSION 2 /* increment whenever you change the interface structure! */
/* prototypes */