1234567891011121314151617181920212223 |
- #pragma once
- #include <Winsock2.h>
- #pragma comment(lib,"ws2_32.lib")
- class WinSocketSystem
- {
- public:
- WinSocketSystem()
- {
- int iResult = WSAStartup(MAKEWORD(2, 2), &wsaData);
- if (iResult != NO_ERROR){
- }
- }
- ~WinSocketSystem()
- {
- WSACleanup();
- }
- protected:
- WSADATA wsaData;
- };
|