diff options
| author | 2015-06-06 14:42:59 +0200 | |
|---|---|---|
| committer | 2015-06-06 14:42:59 +0200 | |
| commit | d0556a2a598e207ab468b7ea4543e427205ef903 (patch) | |
| tree | ad4bd402d060fdaa384f118891e5da13018afdee /src/inspsocket.cpp | |
| parent | Add max outgoing record size option to sslprofile config (diff) | |
Call OnStreamSocketWrite() once per write event
Do sendq flattening in SSL modules, move code for it into class SSLIOHook from core
Diffstat (limited to 'src/inspsocket.cpp')
| -rw-r--r-- | src/inspsocket.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/inspsocket.cpp b/src/inspsocket.cpp index b8f8949dd..436cbb6bb 100644 --- a/src/inspsocket.cpp +++ b/src/inspsocket.cpp @@ -202,33 +202,12 @@ void StreamSocket::DoWrite() if (GetIOHook()) { { - while (error.empty() && !sendq.empty()) { - if (sendq.size() > 1 && sendq.front().length() < 1024) - { - // Avoid multiple repeated SSL encryption invocations - // This adds a single copy of the queue, but avoids - // much more overhead in terms of system calls invoked - // by the IOHook. - // - // The length limit of 1024 is to prevent merging strings - // more than once when writes begin to block. - std::string tmp; - tmp.reserve(1280); - while (!sendq.empty() && tmp.length() < 1024) - { - tmp.append(sendq.front()); - sendq.pop_front(); - } - sendq.push_front(tmp); - } - { int rv = GetIOHook()->OnStreamSocketWrite(this); if (rv > 0) { // consumed the entire string, and is ready for more - sendq.pop_front(); } else if (rv == 0) { |
