aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/smtp/SMTPResponse.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2012-11-11 20:55:44 +0000
committerVincent Richard <[email protected]>2012-11-11 20:55:44 +0000
commit6ae75bc9714d8a5cae48b7a2dfe435fd2a56a6da (patch)
treedf32e4e3cb10e82cf4e0c0897bfa8160132afd3a /src/net/smtp/SMTPResponse.cpp
parentCompatibility with RFC-1341. (diff)
downloadvmime-6ae75bc9714d8a5cae48b7a2dfe435fd2a56a6da.tar.gz
vmime-6ae75bc9714d8a5cae48b7a2dfe435fd2a56a6da.zip
SMTP Command Pipelining (RFC-2920).
Diffstat (limited to 'src/net/smtp/SMTPResponse.cpp')
-rw-r--r--src/net/smtp/SMTPResponse.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/net/smtp/SMTPResponse.cpp b/src/net/smtp/SMTPResponse.cpp
index e1ac2af6..28a1ea87 100644
--- a/src/net/smtp/SMTPResponse.cpp
+++ b/src/net/smtp/SMTPResponse.cpp
@@ -41,9 +41,9 @@ namespace net {
namespace smtp {
-SMTPResponse::SMTPResponse(ref <socket> sok, ref <timeoutHandler> toh)
+SMTPResponse::SMTPResponse(ref <socket> sok, ref <timeoutHandler> toh, const state& st)
: m_socket(sok), m_timeoutHandler(toh),
- m_responseContinues(false)
+ m_responseBuffer(st.responseBuffer), m_responseContinues(false)
{
}
@@ -87,9 +87,9 @@ const string SMTPResponse::getText() const
// static
ref <SMTPResponse> SMTPResponse::readResponse
- (ref <socket> sok, ref <timeoutHandler> toh)
+ (ref <socket> sok, ref <timeoutHandler> toh, const state& st)
{
- ref <SMTPResponse> resp = vmime::create <SMTPResponse>(sok, toh);
+ ref <SMTPResponse> resp = vmime::create <SMTPResponse>(sok, toh, st);
resp->readResponse();
@@ -218,6 +218,15 @@ const SMTPResponse::responseLine SMTPResponse::getLastLine() const
}
+const SMTPResponse::state SMTPResponse::getCurrentState() const
+{
+ state st;
+ st.responseBuffer = m_responseBuffer;
+
+ return st;
+}
+
+
// SMTPResponse::responseLine