void server_handler<endpoint>::http(connection_ptr connection) {
    std::stringstream foo;
    
    foo << "<html><body><p>" 
        << m_broadcast_handler->get_connection_count()
        << " current connections.</p></body></html>";
    
    connection->set_body(foo.str());
}
Example #2
0
 void http(connection_ptr con) {
     con->set_body("<!DOCTYPE html><html><head><title>WebSocket++ TLS certificate test</title></head><body><h1>WebSocket++ TLS certificate test</h1><p>This is an HTTP(S) page served by a WebSocket++ server for the purposes of confirming that certificates are working since browsers normally silently ignore certificate issues.</p></body></html>");
 }