|
Server 0.0.1
HTTP/REST server implementation
|
00001 00026 #ifndef __SERVER_H__ 00027 #define __SERVER_H__ 00028 00029 #include <stdio.h> // for printf() and fprintf() 00030 #include <poll.h> // for poll system call and related 00031 00032 #include <openssl/ssl.h> 00033 00034 #include "class.h" 00035 #include "socket.h" 00036 #include "logger.h" 00037 #include "stream.h" 00038 00039 struct conns { 00040 Sock sock; 00041 Stream stream; 00042 void * worker; 00043 }; 00044 00045 CLASS(Server) { 00046 Logger logger; 00047 Sock sock; 00048 Sock sockSSL; 00049 SSL_CTX * ctx; 00050 void * worker; 00051 00052 nfds_t nfds; 00053 struct pollfd * fds; 00054 long max_fds; 00055 00056 struct conns * conns; 00057 }; 00058 00059 void serverRun(Server this); 00060 00061 #endif // __SERVER_H__ 00062 00063 // vim: set ts=4 sw=4: