From 1d98a31bf45c477e90389a04df42b5b66e31da1a Mon Sep 17 00:00:00 2001 From: by <123456@qq.com> Date: Sat, 7 Sep 2024 14:29:34 +0800 Subject: [PATCH] =?UTF-8?q?token=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gamesrv/clawdoll/action_clawdoll.go | 92 ----------- machine/action/action_server.go | 8 +- protocol/machine/machine.pb.go | 235 +++------------------------- protocol/machine/machine.proto | 14 -- 4 files changed, 28 insertions(+), 321 deletions(-) diff --git a/gamesrv/clawdoll/action_clawdoll.go b/gamesrv/clawdoll/action_clawdoll.go index 0f785fb..8e67d2d 100644 --- a/gamesrv/clawdoll/action_clawdoll.go +++ b/gamesrv/clawdoll/action_clawdoll.go @@ -1,7 +1,6 @@ package clawdoll import ( - "github.com/zegoim/zego_server_assistant/token/go/src/token04" "mongo.games.com/game/common" rule "mongo.games.com/game/gamerule/clawdoll" "mongo.games.com/game/gamesrv/base" @@ -9,7 +8,6 @@ import ( "mongo.games.com/game/protocol/machine" "mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/netlib" - "strconv" ) type CSPlayerOpPacketFactory struct { @@ -97,98 +95,8 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data return nil } -type CSGetTokenPacketFactory struct { -} - -type CSGetTokenHandler struct { -} - -func (f *CSGetTokenPacketFactory) CreatePacket() interface{} { - pack := &clawdoll.CSCLAWDOLLGetToken{} - return pack -} - -func (h *CSGetTokenHandler) Process(s *netlib.Session, packetid int, data interface{}, sid int64) error { - //转发到娃娃机主机 - logger.Logger.Tracef("CSGetTokenHandler") - if _, ok := data.(*clawdoll.CSCLAWDOLLGetToken); ok { - p := base.PlayerMgrSington.GetPlayer(sid) - if p == nil { - logger.Logger.Warn("CSGetTokenHandler p == nil") - return nil - } - - scene := p.GetScene() - if scene == nil { - return nil - } - sceneEx, ok := scene.ExtraData.(*SceneEx) - if !ok { - return nil - } - - machineId := scene.GetDBGameFree().GetId() % 6080000 - machineInfo := sceneEx.GetMachineServerInfo(machineId, p.Platform) - if machineInfo == nil { - logger.Logger.Warn("CSGetTokenHandler machineId = %v not found", machineId) - return nil - } - - logger.Logger.Tracef("获取娃娃机 appId = %v, serverSecret = %v, streamId = %v,snid = %d", machineInfo.AppId, machineInfo.ServerSecret, machineInfo.StreamId, p.SnId) - - //生成token - token, err := token04.GenerateToken04(uint32(machineInfo.AppId), strconv.Itoa(int(p.SnId)), machineInfo.ServerSecret, 7200, "") - if err != nil { - logger.Logger.Error(err) - return err - } - logger.Logger.Trace("======================token========================", token) - - pack := &clawdoll.SCCLAWDOLLSendToken{ - LogicId: scene.DBGameFree.GetId(), - Appid: machineInfo.AppId, - Token: token, - StreamId: machineInfo.StreamId, - } - p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_SENDTOKEN), pack) - } - return nil -} - -// 娃娃机返回token 通知客户端 -func MSSendTokenHandler(session *netlib.Session, packetId int, data interface{}) error { - logger.Logger.Tracef("MSSendTokenHandler") - if msg, ok := data.(*machine.MSSendToken); ok { - //给客户端返回token - token := msg.Token - p := base.PlayerMgrSington.GetPlayerBySnId(msg.GetSnid()) - if p == nil { - logger.Logger.Warn("MSSendTokenHandler p == nil") - return nil - } - - scene := p.GetScene() - if scene == nil { - return nil - } - - pack := &clawdoll.SCCLAWDOLLSendToken{ - LogicId: scene.DBGameFree.GetId(), - Appid: msg.Appid, - Token: token, - StreamId: msg.StreamId, - } - p.SendToClient(int(clawdoll.CLAWDOLLPacketID_PACKET_SC_SENDTOKEN), pack) - } - return nil -} func init() { common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpHandler{}) netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpPacketFactory{}) netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{}, MSDollMachineoCoinResultHandler) - //客户端请求token - common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenHandler{}) - netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_GETTOKEN), &CSGetTokenPacketFactory{}) - //获取token返回 - netlib.Register(int(machine.DollMachinePacketID_PACKET_MSSendToken), &machine.MSSendToken{}, MSSendTokenHandler) } diff --git a/machine/action/action_server.go b/machine/action/action_server.go index 520fbfe..bbbac92 100644 --- a/machine/action/action_server.go +++ b/machine/action/action_server.go @@ -3,14 +3,12 @@ package action import ( "bytes" "fmt" - "github.com/zegoim/zego_server_assistant/token/go/src/token04" "math" "mongo.games.com/game/machine/machinedoll" "mongo.games.com/game/protocol/machine" "mongo.games.com/goserver/core/logger" "mongo.games.com/goserver/core/netlib" "mongo.games.com/goserver/core/timer" - "strconv" "sync" "time" ) @@ -270,7 +268,7 @@ func SMGameLinkSucceedHandler(session *netlib.Session, packetId int, data interf return nil } -// 获取进入视频房间token +/*// 获取进入视频房间token func SMGetTokenHandler(session *netlib.Session, packetId int, data interface{}) error { logger.Logger.Tracef("SMGetTokenHandler %v", data) msg, ok := data.(*machine.SMGetToken) @@ -309,12 +307,12 @@ func SMGetTokenHandler(session *netlib.Session, packetId int, data interface{}) session.Send(int(machine.DollMachinePacketID_PACKET_MSSendToken), info) fmt.Println("向游戏服务器发送娃娃机token:%v", info) return nil -} +}*/ func init() { netlib.Register(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), &machine.SMDollMachineoPerate{}, SMDollMachinePerateHandler) netlib.Register(int(machine.DollMachinePacketID_PACKET_SMDollMachineGrab), &machine.SMDollMachineGrab{}, SMDollMachineGrabHandler) //链接成功 返回消息 netlib.Register(int(machine.DollMachinePacketID_PACKET_SMGameLinkSucceed), &machine.SMGameLinkSucceed{}, SMGameLinkSucceedHandler) - netlib.Register(int(machine.DollMachinePacketID_PACKET_SMGetToken), &machine.SMGetToken{}, SMGetTokenHandler) + //netlib.Register(int(machine.DollMachinePacketID_PACKET_SMGetToken), &machine.SMGetToken{}, SMGetTokenHandler) } diff --git a/protocol/machine/machine.pb.go b/protocol/machine/machine.pb.go index e3cc943..592eab4 100644 --- a/protocol/machine/machine.pb.go +++ b/protocol/machine/machine.pb.go @@ -496,150 +496,6 @@ func (x *MSUpdateDollMachineStatus) GetVideoAddr() string { return "" } -//获取token -type SMGetToken struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` - AppId int64 `protobuf:"varint,2,opt,name=AppId,proto3" json:"AppId,omitempty"` - ServerSecret string `protobuf:"bytes,3,opt,name=ServerSecret,proto3" json:"ServerSecret,omitempty"` - StreamId string `protobuf:"bytes,4,opt,name=StreamId,proto3" json:"StreamId,omitempty"` -} - -func (x *SMGetToken) Reset() { - *x = SMGetToken{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SMGetToken) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SMGetToken) ProtoMessage() {} - -func (x *SMGetToken) ProtoReflect() protoreflect.Message { - mi := &file_machine_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SMGetToken.ProtoReflect.Descriptor instead. -func (*SMGetToken) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{7} -} - -func (x *SMGetToken) GetSnid() int32 { - if x != nil { - return x.Snid - } - return 0 -} - -func (x *SMGetToken) GetAppId() int64 { - if x != nil { - return x.AppId - } - return 0 -} - -func (x *SMGetToken) GetServerSecret() string { - if x != nil { - return x.ServerSecret - } - return "" -} - -func (x *SMGetToken) GetStreamId() string { - if x != nil { - return x.StreamId - } - return "" -} - -//返回token -type MSSendToken struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Snid int32 `protobuf:"varint,1,opt,name=Snid,proto3" json:"Snid,omitempty"` - Appid int64 `protobuf:"varint,2,opt,name=Appid,proto3" json:"Appid,omitempty"` - Token string `protobuf:"bytes,3,opt,name=Token,proto3" json:"Token,omitempty"` - StreamId string `protobuf:"bytes,4,opt,name=StreamId,proto3" json:"StreamId,omitempty"` -} - -func (x *MSSendToken) Reset() { - *x = MSSendToken{} - if protoimpl.UnsafeEnabled { - mi := &file_machine_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MSSendToken) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MSSendToken) ProtoMessage() {} - -func (x *MSSendToken) ProtoReflect() protoreflect.Message { - mi := &file_machine_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use MSSendToken.ProtoReflect.Descriptor instead. -func (*MSSendToken) Descriptor() ([]byte, []int) { - return file_machine_proto_rawDescGZIP(), []int{8} -} - -func (x *MSSendToken) GetSnid() int32 { - if x != nil { - return x.Snid - } - return 0 -} - -func (x *MSSendToken) GetAppid() int64 { - if x != nil { - return x.Appid - } - return 0 -} - -func (x *MSSendToken) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -func (x *MSSendToken) GetStreamId() string { - if x != nil { - return x.StreamId - } - return "" -} - var File_machine_proto protoreflect.FileDescriptor var file_machine_proto_rawDesc = []byte{ @@ -677,44 +533,29 @@ var file_machine_proto_rawDesc = []byte{ 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x41, - 0x64, 0x64, 0x72, 0x22, 0x76, 0x0a, 0x0a, 0x53, 0x4d, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12, - 0x1a, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x08, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x69, 0x0a, 0x0b, 0x4d, - 0x53, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x14, - 0x0a, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, - 0x70, 0x70, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x74, - 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x2a, 0xb9, 0x02, 0x0a, 0x13, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, - 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x18, - 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x6e, - 0x6b, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x10, 0xa0, 0x9c, 0x01, 0x12, 0x20, 0x0a, 0x1a, - 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, - 0x68, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10, 0xa1, 0x9c, 0x01, 0x12, 0x1e, - 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x10, 0xa2, 0x9c, 0x01, 0x12, 0x1e, - 0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, - 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x26, - 0x0a, 0x20, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x10, 0xa4, 0x9c, 0x01, 0x12, 0x27, 0x0a, 0x21, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, - 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x6f, 0x50, - 0x65, 0x72, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x10, 0xa5, 0x9c, 0x01, 0x12, - 0x17, 0x0a, 0x11, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x47, 0x65, 0x74, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa6, 0x9c, 0x01, 0x12, 0x18, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, - 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa7, - 0x9c, 0x01, 0x42, 0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, - 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x64, 0x64, 0x72, 0x2a, 0xb9, 0x02, 0x0a, 0x13, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x18, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x75, + 0x63, 0x63, 0x65, 0x65, 0x64, 0x10, 0xa0, 0x9c, 0x01, 0x12, 0x20, 0x0a, 0x1a, 0x50, 0x41, 0x43, + 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, + 0x65, 0x50, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10, 0xa1, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x10, 0xa2, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, + 0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x26, 0x0a, 0x20, 0x50, + 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x6f, + 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10, + 0xa4, 0x9c, 0x01, 0x12, 0x27, 0x0a, 0x21, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, + 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x6f, 0x50, 0x65, 0x72, 0x61, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x10, 0xa5, 0x9c, 0x01, 0x12, 0x17, 0x0a, 0x11, + 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x10, 0xa6, 0x9c, 0x01, 0x12, 0x18, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, + 0x4d, 0x53, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa7, 0x9c, 0x01, 0x42, + 0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -730,7 +571,7 @@ func file_machine_proto_rawDescGZIP() []byte { } var file_machine_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_machine_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_machine_proto_goTypes = []interface{}{ (DollMachinePacketID)(0), // 0: machine.DollMachinePacketID (*SMGameLinkSucceed)(nil), // 1: machine.SMGameLinkSucceed @@ -740,8 +581,6 @@ var file_machine_proto_goTypes = []interface{}{ (*MSDollMachineList)(nil), // 5: machine.MSDollMachineList (*DollMachine)(nil), // 6: machine.DollMachine (*MSUpdateDollMachineStatus)(nil), // 7: machine.MSUpdateDollMachineStatus - (*SMGetToken)(nil), // 8: machine.SMGetToken - (*MSSendToken)(nil), // 9: machine.MSSendToken } var file_machine_proto_depIdxs = []int32{ 6, // 0: machine.MSDollMachineList.data:type_name -> machine.DollMachine @@ -842,30 +681,6 @@ func file_machine_proto_init() { return nil } } - file_machine_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SMGetToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_machine_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MSSendToken); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -873,7 +688,7 @@ func file_machine_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_machine_proto_rawDesc, NumEnums: 1, - NumMessages: 9, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/protocol/machine/machine.proto b/protocol/machine/machine.proto index a109267..ba7c784 100644 --- a/protocol/machine/machine.proto +++ b/protocol/machine/machine.proto @@ -58,18 +58,4 @@ message MSUpdateDollMachineStatus{ int32 Id = 1; int32 Status = 2; //1-空闲 0-无法使用 string VideoAddr = 3; -} -//获取token -message SMGetToken{ - int32 Snid = 1; - int64 AppId = 2; - string ServerSecret = 3; - string StreamId = 4; -} -//返回token -message MSSendToken{ - int32 Snid = 1; - int64 Appid = 2; - string Token = 3; - string StreamId = 4; } \ No newline at end of file