aboutsummaryrefslogtreecommitdiffstats
path: root/src/security/sasl/SASLSocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/security/sasl/SASLSocket.cpp')
-rw-r--r--src/security/sasl/SASLSocket.cpp34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/security/sasl/SASLSocket.cpp b/src/security/sasl/SASLSocket.cpp
index 28f5f6f6..531e4188 100644
--- a/src/security/sasl/SASLSocket.cpp
+++ b/src/security/sasl/SASLSocket.cpp
@@ -177,6 +177,40 @@ void SASLSocket::sendRaw(const char* buffer, const size_type count)
}
+SASLSocket::size_type SASLSocket::sendRawNonBlocking(const char* buffer, const size_type count)
+{
+ byte_t* output = 0;
+ int outputLen = 0;
+
+ m_session->getMechanism()->encode
+ (m_session, reinterpret_cast <const byte_t*>(buffer), count,
+ &output, &outputLen);
+
+ size_type bytesSent = 0;
+
+ try
+ {
+ bytesSent = m_wrapped->sendRawNonBlocking
+ (reinterpret_cast <const char*>(output), outputLen);
+ }
+ catch (...)
+ {
+ delete [] output;
+ throw;
+ }
+
+ delete [] output;
+
+ return bytesSent;
+}
+
+
+unsigned int SASLSocket::getStatus() const
+{
+ return m_wrapped->getStatus();
+}
+
+
} // sasl
} // security
} // vmime