#ifndef __Socket_h_ #define __Socket_h_ #include #ifndef NO_SSL #include #endif #include "common.h" #ifndef NO_SSL #include "dynassl.h" #endif class Socket { public: SOCKET s; #ifndef NO_SSL SSL *ssl; #endif #ifndef NO_SSL Socket(SOCKET is = -1, SSL *issl = 0) { s = is; ssl = issl; } BOOL isSSL() { return ssl ? TRUE : FALSE; } #else /* NO_SSL */ Socket(SOCKET is = -1) { s = is; } #endif /* NO_SSL */ SOCKET getSocket() { return s; } int read(char *buf, int len); int write(char *buf, int len); }; #endif __Socket_h_