Beispiel #1
0
void friends(int sock, string msg){
    string allusers = "frd:";
    vector<string> nickNames = conts.getAllUsers();
    for (int i = 0; i < nickNames.size(); i++){
        allusers = allusers  + "\n" + nickNames[i];
    }
    if (send(sock, &(allusers[0]), allusers.length(), 0))
        perror("send");
}