From 5d8282568759f1e7c33537153f1ac0f190d64888 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 30 Nov 2009 13:04:15 +0000 Subject: Added block size on sockets to allow different buffer size for SSL. --- src/platforms/windows/windowsSocket.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/platforms/windows/windowsSocket.cpp') diff --git a/src/platforms/windows/windowsSocket.cpp b/src/platforms/windows/windowsSocket.cpp index 8a425836..3ff9ad50 100644 --- a/src/platforms/windows/windowsSocket.cpp +++ b/src/platforms/windows/windowsSocket.cpp @@ -121,6 +121,12 @@ void windowsSocket::disconnect() } +windowsSocket::size_type windowsSocket::getBlockSize() const +{ + return 16384; // 16 KB +} + + void windowsSocket::receive(vmime::string& buffer) { int ret = ::recv(m_desc, m_buffer, sizeof(m_buffer), 0); @@ -137,7 +143,7 @@ void windowsSocket::receive(vmime::string& buffer) } -int windowsSocket::receiveRaw(char* buffer, const int count) +windowsSocket::size_type windowsSocket::receiveRaw(char* buffer, const size_type count) { int ret = ::recv(m_desc, buffer, count, 0); @@ -159,7 +165,7 @@ void windowsSocket::send(const vmime::string& buffer) } -void windowsSocket::sendRaw(const char* buffer, const int count) +void windowsSocket::sendRaw(const char* buffer, const size_type count) { ::send(m_desc, buffer, count, 0); } -- cgit