Net Windows automatic (un)initialize

automatic network (un)initialization on windows
NumericString 64-bit compile/warning fixes
This commit is contained in:
aleks-f
2012-12-19 00:38:18 -06:00
parent b38e5bf3df
commit 8fe3a398af
23 changed files with 207 additions and 107 deletions

View File

@@ -67,9 +67,6 @@ SocketImpl::SocketImpl():
_sockfd(POCO_INVALID_SOCKET),
_blocking(true)
{
#if defined(_WIN32)
Poco::Net::initializeNetwork();
#endif
}
@@ -77,18 +74,12 @@ SocketImpl::SocketImpl(poco_socket_t sockfd):
_sockfd(sockfd),
_blocking(true)
{
#if defined(_WIN32)
Poco::Net::initializeNetwork();
#endif
}
SocketImpl::~SocketImpl()
{
close();
#if defined(_WIN32)
Poco::Net::uninitializeNetwork();
#endif
}