feat sc改名ss
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user