From: Ebersold Andre Date: Fri, 3 Jun 2022 15:05:56 +0000 (+0200) Subject: Start implementing an fcgi minimalist prototype X-Git-Url: https://git.ebersold.fr/?a=commitdiff_plain;h=dde71f4a6e8c9cb31a54eb98aca981f375ab6ab3;p=aebutils.git Start implementing an fcgi minimalist prototype --- diff --git a/aeb/fcgi/fcgi.h b/aeb/fcgi/fcgi.h new file mode 100644 index 0000000..8511368 --- /dev/null +++ b/aeb/fcgi/fcgi.h @@ -0,0 +1,48 @@ +#ifndef __FCGI_H__ +#define __FCGI_H__ + +namespace aeb { +namespace fcgi { + + +/** + * + */ +template +class acceptor : public basic_socket_acceptor +{ + public: + typedef Descriptor socket_type; + acceptor(const ip::basic_endpoint &e) : + basic_socket_acceptor(e) + { + int val = 1; + m_socket.set_option(SO_REUSEADDR,val); + }; + // Acceptor main entry + void on_accept() + { + endpoint_type tmp; + int len = tmp.size(); + detail::socket_type s; + aeb::sys::error ec; + + s = aeb::net::accept(this->m_descriptor,tmp.data(),&len,ec); + std::cout<<"fcgi::acceptor ("<m_descriptor<<"):"<<" Error="<