mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Support for chat message (WIP)
This commit is contained in:
parent
2a373bbf79
commit
4f9e67d700
6 changed files with 138 additions and 11 deletions
|
|
@ -185,6 +185,17 @@ message Friend_Messages {
|
|||
}
|
||||
}
|
||||
|
||||
message Steam_Messages {
|
||||
enum Types {
|
||||
FRIEND_CHAT = 0;
|
||||
}
|
||||
|
||||
Types type = 1;
|
||||
oneof message_data {
|
||||
bytes message = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message Common_Message {
|
||||
uint64 source_id = 1;
|
||||
uint64 dest_id = 2;
|
||||
|
|
@ -200,6 +211,7 @@ message Common_Message {
|
|||
Friend_Messages friend_messages = 11;
|
||||
Network_Old network_old = 12;
|
||||
Networking_Sockets networking_sockets = 13;
|
||||
Steam_Messages steam_messages = 14;
|
||||
}
|
||||
|
||||
uint32 source_ip = 128;
|
||||
|
|
|
|||
|
|
@ -533,6 +533,11 @@ void Networking::do_callbacks_message(Common_Message *msg)
|
|||
PRINT_DEBUG("has_networking_sockets\n");
|
||||
run_callbacks(CALLBACK_ID_NETWORKING_SOCKETS, msg);
|
||||
}
|
||||
|
||||
if (msg->has_steam_messages()) {
|
||||
PRINT_DEBUG("has_steam_messages\n");
|
||||
run_callbacks(CALLBACK_ID_STEAM_MESSAGES, msg);
|
||||
}
|
||||
}
|
||||
|
||||
bool Networking::handle_tcp(Common_Message *msg, struct TCP_Socket &socket)
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ enum Callback_Ids {
|
|||
CALLBACK_ID_AUTH_TICKET,
|
||||
CALLBACK_ID_FRIEND_MESSAGES,
|
||||
CALLBACK_ID_NETWORKING_SOCKETS,
|
||||
CALLBACK_ID_STEAM_MESSAGES,
|
||||
|
||||
CALLBACK_IDS_MAX
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue