Compare commits
2 Commits
d769605d09
...
0b91f46fd8
Author | SHA1 | Date |
---|---|---|
|
0b91f46fd8 | |
|
1d98a31bf4 |
|
@ -1,7 +1,6 @@
|
||||||
package clawdoll
|
package clawdoll
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/zegoim/zego_server_assistant/token/go/src/token04"
|
|
||||||
"mongo.games.com/game/common"
|
"mongo.games.com/game/common"
|
||||||
rule "mongo.games.com/game/gamerule/clawdoll"
|
rule "mongo.games.com/game/gamerule/clawdoll"
|
||||||
"mongo.games.com/game/gamesrv/base"
|
"mongo.games.com/game/gamesrv/base"
|
||||||
|
@ -9,7 +8,6 @@ import (
|
||||||
"mongo.games.com/game/protocol/machine"
|
"mongo.games.com/game/protocol/machine"
|
||||||
"mongo.games.com/goserver/core/logger"
|
"mongo.games.com/goserver/core/logger"
|
||||||
"mongo.games.com/goserver/core/netlib"
|
"mongo.games.com/goserver/core/netlib"
|
||||||
"strconv"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type CSPlayerOpPacketFactory struct {
|
type CSPlayerOpPacketFactory struct {
|
||||||
|
@ -97,98 +95,8 @@ func MSDollMachineoCoinResultHandler(session *netlib.Session, packetId int, data
|
||||||
return nil
|
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() {
|
func init() {
|
||||||
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpHandler{})
|
common.RegisterHandler(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpHandler{})
|
||||||
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpPacketFactory{})
|
netlib.RegisterFactory(int(clawdoll.CLAWDOLLPacketID_PACKET_CS_PLAYEROP), &CSPlayerOpPacketFactory{})
|
||||||
netlib.Register(int(machine.DollMachinePacketID_PACKET_MSDollMachineoPerateResult), &machine.MSDollMachineoPerateResult{}, MSDollMachineoCoinResultHandler)
|
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)
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,14 +3,12 @@ package action
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/zegoim/zego_server_assistant/token/go/src/token04"
|
|
||||||
"math"
|
"math"
|
||||||
"mongo.games.com/game/machine/machinedoll"
|
"mongo.games.com/game/machine/machinedoll"
|
||||||
"mongo.games.com/game/protocol/machine"
|
"mongo.games.com/game/protocol/machine"
|
||||||
"mongo.games.com/goserver/core/logger"
|
"mongo.games.com/goserver/core/logger"
|
||||||
"mongo.games.com/goserver/core/netlib"
|
"mongo.games.com/goserver/core/netlib"
|
||||||
"mongo.games.com/goserver/core/timer"
|
"mongo.games.com/goserver/core/timer"
|
||||||
"strconv"
|
|
||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
@ -270,7 +268,7 @@ func SMGameLinkSucceedHandler(session *netlib.Session, packetId int, data interf
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取进入视频房间token
|
/*// 获取进入视频房间token
|
||||||
func SMGetTokenHandler(session *netlib.Session, packetId int, data interface{}) error {
|
func SMGetTokenHandler(session *netlib.Session, packetId int, data interface{}) error {
|
||||||
logger.Logger.Tracef("SMGetTokenHandler %v", data)
|
logger.Logger.Tracef("SMGetTokenHandler %v", data)
|
||||||
msg, ok := data.(*machine.SMGetToken)
|
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)
|
session.Send(int(machine.DollMachinePacketID_PACKET_MSSendToken), info)
|
||||||
fmt.Println("向游戏服务器发送娃娃机token:%v", info)
|
fmt.Println("向游戏服务器发送娃娃机token:%v", info)
|
||||||
return nil
|
return nil
|
||||||
}
|
}*/
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
netlib.Register(int(machine.DollMachinePacketID_PACKET_SMDollMachinePerate), &machine.SMDollMachineoPerate{}, SMDollMachinePerateHandler)
|
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_SMDollMachineGrab), &machine.SMDollMachineGrab{}, SMDollMachineGrabHandler)
|
||||||
//链接成功 返回消息
|
//链接成功 返回消息
|
||||||
netlib.Register(int(machine.DollMachinePacketID_PACKET_SMGameLinkSucceed), &machine.SMGameLinkSucceed{}, SMGameLinkSucceedHandler)
|
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)
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,150 +496,6 @@ func (x *MSUpdateDollMachineStatus) GetVideoAddr() string {
|
||||||
return ""
|
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 protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_machine_proto_rawDesc = []byte{
|
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,
|
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,
|
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, 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,
|
0x64, 0x64, 0x72, 0x2a, 0xb9, 0x02, 0x0a, 0x13, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68,
|
||||||
0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52,
|
0x69, 0x6e, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x18, 0x50,
|
||||||
0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x18, 0x02,
|
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68,
|
||||||
0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41, 0x70, 0x70, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x53,
|
0x69, 0x6e, 0x65, 0x5a, 0x65, 0x72, 0x6f, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x18, 0x50, 0x41, 0x43,
|
||||||
0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,
|
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x6e, 0x6b, 0x53, 0x75,
|
||||||
0x09, 0x52, 0x0c, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x12,
|
0x63, 0x63, 0x65, 0x65, 0x64, 0x10, 0xa0, 0x9c, 0x01, 0x12, 0x20, 0x0a, 0x1a, 0x50, 0x41, 0x43,
|
||||||
0x1a, 0x0a, 0x08, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
|
0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e,
|
||||||
0x09, 0x52, 0x08, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x22, 0x69, 0x0a, 0x0b, 0x4d,
|
0x65, 0x50, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10, 0xa1, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50,
|
||||||
0x53, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x6e,
|
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68,
|
||||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x53, 0x6e, 0x69, 0x64, 0x12, 0x14,
|
0x69, 0x6e, 0x65, 0x47, 0x72, 0x61, 0x62, 0x10, 0xa2, 0x9c, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x50,
|
||||||
0x0a, 0x05, 0x41, 0x70, 0x70, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x41,
|
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68,
|
||||||
0x70, 0x70, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20,
|
0x69, 0x6e, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x10, 0xa3, 0x9c, 0x01, 0x12, 0x26, 0x0a, 0x20, 0x50,
|
||||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x74,
|
0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x44, 0x6f,
|
||||||
0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x74,
|
0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x10,
|
||||||
0x72, 0x65, 0x61, 0x6d, 0x49, 0x64, 0x2a, 0xb9, 0x02, 0x0a, 0x13, 0x44, 0x6f, 0x6c, 0x6c, 0x4d,
|
0xa4, 0x9c, 0x01, 0x12, 0x27, 0x0a, 0x21, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x4d, 0x53,
|
||||||
0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x49, 0x44, 0x12, 0x1c,
|
0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x6f, 0x50, 0x65, 0x72, 0x61,
|
||||||
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d,
|
0x74, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x10, 0xa5, 0x9c, 0x01, 0x12, 0x17, 0x0a, 0x11,
|
||||||
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, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65,
|
||||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x47, 0x61, 0x6d, 0x65, 0x4c, 0x69, 0x6e,
|
0x6e, 0x10, 0xa6, 0x9c, 0x01, 0x12, 0x18, 0x0a, 0x12, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f,
|
||||||
0x6b, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x10, 0xa0, 0x9c, 0x01, 0x12, 0x20, 0x0a, 0x1a,
|
0x4d, 0x53, 0x53, 0x65, 0x6e, 0x64, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x10, 0xa7, 0x9c, 0x01, 0x42,
|
||||||
0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d, 0x61, 0x63,
|
0x27, 0x5a, 0x25, 0x6d, 0x6f, 0x6e, 0x67, 0x6f, 0x2e, 0x67, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x63,
|
||||||
0x68, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x61, 0x74, 0x65, 0x10, 0xa1, 0x9c, 0x01, 0x12, 0x1e,
|
0x6f, 0x6d, 0x2f, 0x67, 0x61, 0x6d, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
|
||||||
0x0a, 0x18, 0x50, 0x41, 0x43, 0x4b, 0x45, 0x54, 0x5f, 0x53, 0x4d, 0x44, 0x6f, 0x6c, 0x6c, 0x4d,
|
0x2f, 0x6d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
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 (
|
var (
|
||||||
|
@ -730,7 +571,7 @@ func file_machine_proto_rawDescGZIP() []byte {
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_machine_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
|
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{}{
|
var file_machine_proto_goTypes = []interface{}{
|
||||||
(DollMachinePacketID)(0), // 0: machine.DollMachinePacketID
|
(DollMachinePacketID)(0), // 0: machine.DollMachinePacketID
|
||||||
(*SMGameLinkSucceed)(nil), // 1: machine.SMGameLinkSucceed
|
(*SMGameLinkSucceed)(nil), // 1: machine.SMGameLinkSucceed
|
||||||
|
@ -740,8 +581,6 @@ var file_machine_proto_goTypes = []interface{}{
|
||||||
(*MSDollMachineList)(nil), // 5: machine.MSDollMachineList
|
(*MSDollMachineList)(nil), // 5: machine.MSDollMachineList
|
||||||
(*DollMachine)(nil), // 6: machine.DollMachine
|
(*DollMachine)(nil), // 6: machine.DollMachine
|
||||||
(*MSUpdateDollMachineStatus)(nil), // 7: machine.MSUpdateDollMachineStatus
|
(*MSUpdateDollMachineStatus)(nil), // 7: machine.MSUpdateDollMachineStatus
|
||||||
(*SMGetToken)(nil), // 8: machine.SMGetToken
|
|
||||||
(*MSSendToken)(nil), // 9: machine.MSSendToken
|
|
||||||
}
|
}
|
||||||
var file_machine_proto_depIdxs = []int32{
|
var file_machine_proto_depIdxs = []int32{
|
||||||
6, // 0: machine.MSDollMachineList.data:type_name -> machine.DollMachine
|
6, // 0: machine.MSDollMachineList.data:type_name -> machine.DollMachine
|
||||||
|
@ -842,30 +681,6 @@ func file_machine_proto_init() {
|
||||||
return nil
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
|
@ -873,7 +688,7 @@ func file_machine_proto_init() {
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: file_machine_proto_rawDesc,
|
RawDescriptor: file_machine_proto_rawDesc,
|
||||||
NumEnums: 1,
|
NumEnums: 1,
|
||||||
NumMessages: 9,
|
NumMessages: 7,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
|
|
|
@ -58,18 +58,4 @@ message MSUpdateDollMachineStatus{
|
||||||
int32 Id = 1;
|
int32 Id = 1;
|
||||||
int32 Status = 2; //1-空闲 0-无法使用
|
int32 Status = 2; //1-空闲 0-无法使用
|
||||||
string VideoAddr = 3;
|
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;
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue