Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk/src/winsock.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 66 by z0rac, Fri Jan 22 09:37:15 2010 UTC revision 67 by z0rac, Tue Jan 26 19:26:42 2010 UTC
# Line 10  Line 10 
10  #include <exception>  #include <exception>
11  #include <string>  #include <string>
12  #include <winsock2.h>  #include <winsock2.h>
13    #include <wininet.h>
14  #include <ws2tcpip.h>  #include <ws2tcpip.h>
15  #define SECURITY_WIN32  #define SECURITY_WIN32
16  #include <security.h>  #include <security.h>
# Line 31  public: Line 32  public:
32                                        int domain = AF_UNSPEC);                                        int domain = AF_UNSPEC);
33    static void freeaddrinfo(struct addrinfo* info) { _free(info); }    static void freeaddrinfo(struct addrinfo* info) { _free(info); }
34  public:  public:
35    // tcp - TCP client socket    // tcpclient - TCP client socket
36    class tcpclient {    class tcpclient {
37      SOCKET _socket;      SOCKET _socket;
38      tcpclient(const tcpclient&); void operator=(const tcpclient&); // disable to copy      tcpclient(const tcpclient&); void operator=(const tcpclient&); // disable to copy
# Line 76  public: Line 77  public:
77      bool avail() const { return _avail; }      bool avail() const { return _avail; }
78      tlsclient& connect();      tlsclient& connect();
79      tlsclient& shutdown();      tlsclient& shutdown();
80      bool authenticate(const string& cn);      bool verify(const string& cn, DWORD ignore = 0);
81      size_t recv(char* buf, size_t size);      size_t recv(char* buf, size_t size);
82      size_t send(const char* data, size_t size);      size_t send(const char* data, size_t size);
83    protected:    protected:

Legend:
Removed from v.66  
changed lines
  Added in v.67

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26