trying to support notice event

This commit is contained in:
2025-02-18 01:02:26 +09:00
parent be7f4f4da5
commit a0efb55c3e
7 changed files with 237 additions and 72 deletions

View File

@ -62,3 +62,7 @@ func MakePeerDataPacket(route_id RouteId, peer_id PeerId, data []byte) *Packet {
return &Packet{Kind: PACKET_KIND_PEER_DATA,
U: &Packet_Data{Data: &PeerData{RouteId: uint32(route_id), PeerId: uint32(peer_id), Data: data}}}
}
func MakeConnNoticePacket(msg string) *Packet {
return &Packet{Kind: PACKET_KIND_CONN_NOTICE, U: &Packet_Notice{Notice: &ConnNotice{Text: msg}}}
}