while(true) {
    auto client = socket.accept();
    spawn(&handleConnection, cast(shared)client);
}

void handleConnection(shared Socket sclient) {
    Socket client=cast()sclient;
    //do stuff like receive and send
}

Reply via email to