feat 排队
This commit is contained in:
@@ -10,6 +10,34 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type LoginSuccess struct {
|
||||
}
|
||||
|
||||
func (_ *LoginSuccess) Handle(data []byte, client *Client) {
|
||||
msg := &sc_pb.S2C_LoginSuccess{}
|
||||
if err := proto.Unmarshal(data, msg); err != nil {
|
||||
log.Errorf("handle msg error")
|
||||
client.Stop()
|
||||
return
|
||||
}
|
||||
|
||||
_ = client.WriteMessage(sc_pb.MessageID_MESSAGE_ID_ENTER_INSTANCE, &sc_pb.C2S_EnterInstance{
|
||||
InstanceID: msg.InstanceID,
|
||||
})
|
||||
}
|
||||
|
||||
type QueueUp struct {
|
||||
}
|
||||
|
||||
func (_ *QueueUp) Handle(data []byte, client *Client) {
|
||||
msg := &sc_pb.S2C_QueueUp{}
|
||||
if err := proto.Unmarshal(data, msg); err != nil {
|
||||
log.Errorf("handle msg error")
|
||||
client.Stop()
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
type EnterInstance struct {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user