A chatroom based on c++ and websocket
{
"type":"e.g. login"
"status":"success",
"message":"e.g. Login successful.",
}
{
"type":"e.g. command"
"status":"error",
"message":"e.g. User not found.",
}
{
"type":"login",
"username":"your_username",
"password":"your_password"
}
{
"type":"message",
"message":"hello"
}
{
"type":"message",
"username":"sender_username"
"content":"hello",
}
{
"type":"private_message",
"to":"someone",
"content":"hello"
}
{
"type":"private_message",
"from":"from_user",
"to":"to_user",
"content":"hello"
}
{
"type":"command",
"command":"/list"
}
{
"type":"user_list",
"users":["user1","user2"]
}
{
"type":"command",
"command":"/kick asd",
"password":"your_password"
}
{
"type":"command",
"command":"/ban asd",
"password":"your_password"
}