Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Ssl.h

Go to the documentation of this file.
00001 #ifndef __SSL_H__
00002 #define __SSL_H__
00003 
00004 #include <time.h>
00005 #include <pthread.h>
00006 
00007 #include "os_spec.h"
00008 #include "SslCtx.h"
00009 #include "Mutex.h"
00010 
00011 class Ssl
00012 {
00013 public:
00014     Ssl();
00015     ~Ssl();
00016 
00017     void setTimeOut(bool infinite, int tv_sec, int tv_usec);
00018 
00019     bool open(bool server_mode, SslCtx &ssl_ctx, OS_SPEC_SOCKET_TYPE sock);
00020     
00021     void shutdown(void);
00022 
00023     int read(void* buff, int count);
00024 
00025     int write(void* buff, int count);
00026 
00027     SSL* getSsl(void);
00028 
00029     OS_SPEC_SOCKET_TYPE getStream(void);
00030     
00031 private:
00032     SSL* m_ssl;
00033     Mutex m_lock;
00034     OS_SPEC_SOCKET_TYPE m_sock;
00035     bool m_timeout_infinite;
00036     struct timeval m_timeout;
00037 };
00038     
00039 #endif

Generated at Thu Jul 11 13:31:52 2002 for Peekabooty by doxygen1.2.9 written by Dimitri van Heesch, © 1997-2001