From ce774a0a3d9caa96e69daf0db26936c1aa02cd6d Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Fri, 3 Apr 2026 14:43:13 +0100 Subject: Move a function only used by ssl_openssl into that module. --- include/modules/ssl.h | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'include') diff --git a/include/modules/ssl.h b/include/modules/ssl.h index 336148005..20fbe02c2 100644 --- a/include/modules/ssl.h +++ b/include/modules/ssl.h @@ -198,31 +198,6 @@ protected: /** The status of the TLS connection. */ Status status = STATUS_NONE; - /** Reduce elements in a send queue by appending later elements to the first element until there are no more - * elements to append or a desired length is reached - * @param sendq SendQ to work on - * @param targetsize Target size of the front element - */ - static void FlattenSendQueue(StreamSocket::SendQueue& sendq, size_t targetsize) - { - if ((sendq.size() <= 1) || (sendq.front().length() >= targetsize)) - return; - - // Avoid multiple repeated TLS encryption invocations - // This adds a single copy of the queue, but avoids - // much more overhead in terms of system calls invoked - // by an IOHook. - std::string tmp; - tmp.reserve(std::min(targetsize, sendq.bytes())+1); - do - { - tmp.append(sendq.front()); - sendq.pop_front(); - } - while (!sendq.empty() && tmp.length() < targetsize); - sendq.push_front(tmp); - } - public: static SSLIOHook* IsSSL(StreamSocket* sock) { -- cgit v1.3.1-10-gc9f91