"feat(socket): 添加跨域请求处理并集成enum依赖,优化TCP连接数据注入"

This commit is contained in:
1
2025-06-22 00:50:40 +00:00
parent ef3ce43a14
commit 8c9fbbb3a8
38 changed files with 728 additions and 409 deletions

View File

@@ -1,7 +1,21 @@
package main
import "blazing/common/socket"
import (
"blazing/common/bytearray/serialize"
"blazing/common/core/info"
"blazing/common/socket"
"fmt"
)
func main() {
tt:=info.NewServerInfo()
tt.OnlineID=99
tt.IP=[]byte("127.0.0.1")
tt1:=serialize.NewDefaultPacketHandler[info.ServerInfo]()
tg,_:=tt1.Serialize(*tt)
fmt.Println(tg)
socket.NewServer(socket.WithPort("9999")).Start()
}