refactor: 服务器支持异步消息类型、死锁阻塞、异步慢消息检测

This commit is contained in:
kercylan98
2023-07-07 16:26:19 +08:00
parent f0e3822ecf
commit 1a2c1df289
10 changed files with 176 additions and 35 deletions

View File

@@ -39,8 +39,6 @@ func NewLockstep[ClientID comparable, Command any](options ...LockstepOption[Cli
// - 自定帧序列化方式 WithLockstepSerialization
// - 从特定帧开始追帧
// - 兼容各种基于TCP/UDP/Unix的网络类型可通过客户端实现其他网络类型同步
//
// 可在 examples 目录下找到示例示例项目simple-server-lockstep
type Lockstep[ClientID comparable, Command any] struct {
clients *synchronization.Map[ClientID, component.LockstepClient[ClientID]] // 接受广播的客户端
frames *synchronization.Map[int, []Command] // 所有帧指令