Guest User

Untitled

a guest
Jul 19th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #ifndef Winsock_hxx
  2. #define Winsock_hxx
  3.  
  4. #include <winsock2.h>
  5.  
  6.  
  7. /**
  8. *
  9. */
  10. class Winsock
  11. {
  12. public:
  13. /**
  14. *
  15. */
  16. Winsock() {
  17. WSAStartup( MAKEWORD(2, 2), &wsa_data_ );
  18. }
  19.  
  20.  
  21. /**
  22. *
  23. */
  24. ~Winsock() {
  25. WSACleanup();
  26. }
  27.  
  28. private:
  29. WSADATA wsa_data_;
  30.  
  31.  
  32. };
  33.  
  34.  
  35. static Winsock winsock;
  36.  
  37.  
  38. #endif /* Winsock_hxx */
Add Comment
Please, Sign In to add comment