Beispiel #1
0
void echoMessage(int i)
{
    echoed = false;

    clientIO.send(heavyConnections[i], ECHO_MESSAGE, websocketpp::frame::opcode::value::TEXT);

    while(!echoed) {
        clientIO.run_one();
    }
}
Beispiel #2
0
void nextHeavyweightConnection()
{
    connected = false;
    string uri = "ws://127.0.0." + to_string(address) + ":" + to_string(PORT);
    websocketpp::lib::error_code ec;
    connection_ptr con = clientIO.get_connection(uri, ec);
    clientIO.connect(con);

    while(!connected) {
        clientIO.run_one();
    }

    updateAddress();
}