This commit is contained in:
邹宗楠
2023-08-30 11:58:09 +08:00
parent 1c76565c02
commit 82eba6b49c
3 changed files with 62 additions and 12 deletions

View File

@@ -125,13 +125,17 @@ type PrintInfo struct {
StatusTime time.Time
}
type PrintPoolMap struct {
*sync.RWMutex
PrintObj *TcpClient
}
//连接的客户端,吧每个客户端都放进来
type TcpClient struct {
Clients map[string]*PrintInfo //放tcp连接的printNo 为key
MsgMap map[string]chan *model.PrintMsg //放打印信息的printNo为key
CallBackMap map[string]chan string //放打印信息回调信息的printNo为key
//TimeoutMap map[string]chan bool //退出channel
TimeoutMap map[string]bool //退出channel
TimeoutMap map[string]bool //退出channel
*sync.RWMutex
}