libiqxmlrpc  0.12.4
 All Classes Namespaces Files Functions Typedefs Enumerations
https_server.h
1 // Libiqxmlrpc - an object-oriented XML-RPC solution.
2 // Copyright (C) 2011 Anton Dedov
3 
4 #ifndef _libiqxmlrpc_https_server_h_
5 #define _libiqxmlrpc_https_server_h_
6 
7 #include "server.h"
8 #include "server_conn.h"
9 #include "ssl_connection.h"
10 
11 namespace iqxmlrpc
12 {
13 
15 class LIBIQXMLRPC_API Https_server_connection:
18 {
19  char* send_buf;
20 
21 public:
23 
24  void post_accept() { Reaction_connection::post_accept(); }
25  void finish() { delete this; }
26 
27  bool catch_in_reactor() const { return true; }
28  void log_exception( const std::exception& );
29  void log_unknown_exception();
30 
31 protected:
32  void my_reg_recv();
33  void accept_succeed();
34  void recv_succeed( bool& terminate, size_t req_len, size_t real_len );
35  void send_succeed( bool& terminate );
36  virtual void do_schedule_response();
37 };
38 
40 class LIBIQXMLRPC_API Https_server: public Server {
42 
43 public:
45  Server(bind_addr, new Conn_factory, ef)
46  {
47  static_cast<Conn_factory*>(get_conn_factory())->post_init(this, get_reactor());
48  }
49 };
50 
51 } // namespace iqxmlrpc
52 
53 #endif
Represents server-side HTTPS non-blocking connection.
Definition: https_server.h:15
Abstract base for Executor's factories.
Definition: executor.h:78
bool catch_in_reactor() const
Whether reactor should catch its exceptions.
Definition: https_server.h:27
An object representation of internet address.
Definition: inet_addr.h:27
XML-RPC server.
Definition: server.h:34
Base class for XML-RPC server connections.
Definition: server_conn.h:26
Server connections factory.
Definition: server_conn.h:68
Relatively portable socket class.
Definition: socket.h:13
XML-RPC server that works over secured HTTP connections (HTTPS).
Definition: https_server.h:40
Definition: ssl_connection.h:48
void finish()
Definition: https_server.h:25