Server 0.0.1
HTTP/REST server implementation

include/stream/stream.h

Go to the documentation of this file.
00001 
00023 #ifndef __STREAM_STREAM_H__
00024 #define __STREAM_STREAM_H__
00025 
00026 #include <sys/types.h>
00027 #include <openssl/ssl.h>
00028 
00029 #include "class.h"
00030 
00031 typedef enum e_StreamHandleType {
00032         STREAM_FD = 0,
00033         STREAM_SSL
00034 } StreamHandleType;
00035 
00036 CLASS(Stream) {
00037         StreamHandleType type;
00038         union {
00039                 int   fd;
00040                 SSL * ssl;
00041         }              handle;
00042 };
00043 
00044 ssize_t streamRead(Stream, void *, size_t);
00045 ssize_t streamWrite(Stream, void *, size_t);
00046 
00047 #endif // __STREAM_STREAM_H__
00048 
00049 // vim: set ts=4 sw=4:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines