UsesWinsock.cpp
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:0k
- #include "UsesWinsock.h"
- #include "Win32Exception.h"
- /*
- * namespace OnlineGameLib::Win32
- */
- namespace OnlineGameLib {
- namespace Win32 {
- CUsesWinsock::CUsesWinsock()
- {
- WORD wVersionRequested = 0x202;
-
- if ( 0 != ::WSAStartup( wVersionRequested, &m_data ) )
- {
- throw CWin32Exception( _T("CUsesWinsock::CUsesWinsock()"), ::WSAGetLastError() );
- }
- }
-
- CUsesWinsock::~CUsesWinsock()
- {
- ::WSACleanup();
- }
- } // End of namespace OnlineGameLib
- } // End of namespace Win32