added the CONN_ERROR event t ype

This commit is contained in:
2025-03-04 01:16:46 +09:00
parent 04e2de609e
commit bec93289f5
5 changed files with 201 additions and 93 deletions

View File

@ -67,6 +67,10 @@ func MakeConnDescPacket(token string) *Packet {
return &Packet{Kind: PACKET_KIND_CONN_DESC,U: &Packet_Conn{Conn: &ConnDesc{Token: token}}}
}
func MakeConnNoticePacket(msg string) *Packet {
return &Packet{Kind: PACKET_KIND_CONN_NOTICE, U: &Packet_Notice{Notice: &ConnNotice{Text: msg}}}
func MakeConnErrorPacket(error_id uint32, msg string) *Packet {
return &Packet{Kind: PACKET_KIND_CONN_ERROR, U: &Packet_ConnErr{ConnErr: &ConnError{ErrorId: error_id, Text: msg}}}
}
func MakeConnNoticePacket(msg string) *Packet {
return &Packet{Kind: PACKET_KIND_CONN_NOTICE, U: &Packet_ConnNoti{ConnNoti: &ConnNotice{Text: msg}}}
}