aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/platforms/windows/windowsSocket.cpp11
-rw-r--r--vmime/platforms/windows/windowsSocket.hpp4
2 files changed, 12 insertions, 3 deletions
diff --git a/src/platforms/windows/windowsSocket.cpp b/src/platforms/windows/windowsSocket.cpp
index 3ff9ad50..430c8ea0 100644
--- a/src/platforms/windows/windowsSocket.cpp
+++ b/src/platforms/windows/windowsSocket.cpp
@@ -38,8 +38,8 @@ namespace windows {
// posixSocket
//
-windowsSocket::windowsSocket()
- : m_desc(-1)
+windowsSocket::windowsSocket(ref <vmime::net::timeoutHandler> th)
+ : m_timeoutHandler(th), m_desc(-1)
{
WSAData wsaData;
WSAStartup(MAKEWORD(1, 1), &wsaData);
@@ -179,9 +179,14 @@ void windowsSocket::sendRaw(const char* buffer, const size_type count)
ref <vmime::net::socket> windowsSocketFactory::create()
{
- return vmime::create <windowsSocket>();
+ ref <vmime::net::timeoutHandler> th = NULL;
+ return vmime::create <windowsSocket>(th);
}
+ref <vmime::net::socket> windowsSocketFactory::create(ref <vmime::net::timeoutHandler> th)
+{
+ return vmime::create <windowsSocket>(th);
+}
} // posix
} // platforms
diff --git a/vmime/platforms/windows/windowsSocket.hpp b/vmime/platforms/windows/windowsSocket.hpp
index 2940157b..1c89aeb5 100644
--- a/vmime/platforms/windows/windowsSocket.hpp
+++ b/vmime/platforms/windows/windowsSocket.hpp
@@ -41,6 +41,7 @@ class windowsSocket : public vmime::net::socket
{
public:
windowsSocket();
+ windowsSocket(ref <vmime::net::timeoutHandler> th);
~windowsSocket();
public:
@@ -59,6 +60,8 @@ public:
private:
+ ref <vmime::net::timeoutHandler> m_timeoutHandler;
+
char m_buffer[65536];
SOCKET m_desc;
};
@@ -70,6 +73,7 @@ class windowsSocketFactory : public vmime::net::socketFactory
public:
ref <vmime::net::socket> create();
+ ref <vmime::net::socket> create(ref <vmime::net::timeoutHandler> th);
};