feat sc改名ss

This commit is contained in:
2026-01-12 12:20:10 +08:00
parent 9ff7402d40
commit a2ca234358
5 changed files with 23 additions and 21 deletions

View File

@@ -8,7 +8,7 @@ import (
"errors"
"fmt"
"git.hlsq.asia/mmorpg/service-common/log"
"git.hlsq.asia/mmorpg/service-common/proto/sc/sc_pb"
"git.hlsq.asia/mmorpg/service-common/proto/ss/ss_pb"
"git.hlsq.asia/mmorpg/service-common/utils"
"github.com/gorilla/websocket"
"google.golang.org/protobuf/proto"
@@ -100,7 +100,7 @@ func (c *Client) startReader() {
return
}
msg := &sc_pb.Message{}
msg := &ss_pb.Message{}
if err = proto.Unmarshal(msgByte, msg); err != nil {
continue
}
@@ -132,12 +132,12 @@ func (c *Client) startWriter() {
}
// WriteMessage 发送消息给服务器
func (c *Client) WriteMessage(msgID sc_pb.MessageID, data proto.Message) error {
func (c *Client) WriteMessage(msgID ss_pb.MessageID, data proto.Message) error {
d, err := proto.Marshal(data)
if err != nil {
return err
}
p := &sc_pb.Message{
p := &ss_pb.Message{
ID: msgID,
Payload: d,
}