RemoteSyslogChannel/RemoteSyslogListener: add buffer size configuration property

This commit is contained in:
Günter Obiltschnig
2021-04-11 16:03:08 +02:00
parent 3771a53ae1
commit aa7667d427
4 changed files with 44 additions and 6 deletions

View File

@@ -124,6 +124,7 @@ public:
/// by a colon) can also be specified.
/// * host: (optional) Host name included in syslog messages. If not specified, the host's real domain name or
/// IP address will be used.
/// * buffer: UDP socket send buffer size in bytes. If not specified, the system default is used.
std::string getProperty(const std::string& name) const;
/// Returns the value of the property with the given name.
@@ -136,6 +137,7 @@ public:
static const std::string PROP_FORMAT;
static const std::string PROP_LOGHOST;
static const std::string PROP_HOST;
static const std::string PROP_BUFFER;
static const std::string STRUCTURED_DATA;
protected:
@@ -148,6 +150,7 @@ private:
std::string _host;
int _facility;
bool _bsdFormat;
int _buffer;
DatagramSocket _socket;
SocketAddress _socketAddress;
bool _open;

View File

@@ -73,6 +73,8 @@ public:
/// * threads: The number of parser threads processing
/// received syslog messages. Defaults to 1. A maximum
/// of 16 threads is supported.
/// * buffer: The UDP socket receive buffer size in bytes. If not
/// specified, the system default is used.
std::string getProperty(const std::string& name) const;
/// Returns the value of the property with the given name.
@@ -96,6 +98,7 @@ public:
static const std::string PROP_PORT;
static const std::string PROP_THREADS;
static const std::string PROP_BUFFER;
static const std::string LOG_PROP_APP;
static const std::string LOG_PROP_HOST;
@@ -112,6 +115,7 @@ private:
Poco::NotificationQueue _queue;
Poco::UInt16 _port;
int _threads;
int _buffer;
};