aa
This commit is contained in:
@@ -16,6 +16,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
//入口
|
||||
func ListenTcp() {
|
||||
t := NewTcpClient()
|
||||
l, err := net.Listen("tcp", ":8000")
|
||||
|
||||
@@ -113,8 +113,8 @@ type PrintInfo struct {
|
||||
|
||||
//连接的客户端,吧每个客户端都放进来
|
||||
type TcpClient struct {
|
||||
Clients map[string]*PrintInfo
|
||||
CallBackMap map[string]chan string
|
||||
Clients map[string]*PrintInfo //放tcp连接的,printNo 为key
|
||||
CallBackMap map[string]chan string //放打印信息回调信息的,printNo为key
|
||||
*sync.RWMutex
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user