protobuf migration: replace JSON with prost-generated wire format
- Expanded protocol/lnex.proto with full message set for all packet types - Added prost + prost-build to gateway build pipeline - Refactored all handlers and framing to use prost encode/decode - Removed serde payload structs (now generated from .proto) - Server starts and admin endpoint responds
This commit is contained in:
parent
5534cd01f7
commit
9821814240
31 changed files with 719 additions and 661 deletions
|
|
@ -4,7 +4,7 @@ use tokio::io::{AsyncRead, AsyncWrite};
|
|||
use crate::{
|
||||
domain::session,
|
||||
net::{io, state::State},
|
||||
proto::{GuildInfo, GuildListPayload, PacketId, SessionCrypto, to_payload},
|
||||
proto::{GuildInfo, GuildListPayload, PacketId, SessionCrypto, UserRoleUpdatePayload, to_payload},
|
||||
};
|
||||
|
||||
pub async fn handle_guild_list(
|
||||
|
|
@ -41,9 +41,11 @@ pub async fn handle_guild_list(
|
|||
stream,
|
||||
PacketId::UserRoleUpdate,
|
||||
seq,
|
||||
&to_payload(
|
||||
&serde_json::json!({"user_id": sess.user_id, "guild_id": g.id, "color": color}),
|
||||
),
|
||||
&to_payload(&UserRoleUpdatePayload {
|
||||
user_id: sess.user_id.clone(),
|
||||
guild_id: g.id.clone(),
|
||||
color,
|
||||
}),
|
||||
crypto,
|
||||
)
|
||||
.await?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue