feat 初次提交

This commit is contained in:
2026-01-03 14:26:11 +08:00
parent 5afccdb8de
commit 04a8fa2344
15 changed files with 602 additions and 0 deletions

15
internal/ws/router.go Normal file
View File

@@ -0,0 +1,15 @@
package ws
import "common/proto/sc/sc_pb"
var router map[sc_pb.MessageID]BaseRouter
type BaseRouter interface {
Handle(data []byte, client *Client)
}
func init() {
router = make(map[sc_pb.MessageID]BaseRouter)
router[sc_pb.MessageID_MESSAGE_ID_ENTER_INSTANCE] = &EnterInstance{}
router[sc_pb.MessageID_MESSAGE_ID_POSITION] = &Position{}
}