| 101 | } |
| 102 | |
| 103 | Connection* AxContext::createServer(tcp_pcb* tcp) |
| 104 | { |
| 105 | assert(context != nullptr); |
| 106 | |
| 107 | auto connection = new AxConnection(*this, tcp); |
| 108 | auto server = ssl_server_new(context, intptr_t(connection)); |
| 109 | if(server == nullptr) { |
| 110 | delete connection; |
| 111 | return nullptr; |
| 112 | } |
| 113 | |
| 114 | connection->init(server); |
| 115 | return connection; |
| 116 | } |
| 117 | |
| 118 | // Required by axtls-8266 |
| 119 | extern "C" int ax_get_file(const char*, uint8_t** buf) |