aa
This commit is contained in:
@@ -119,7 +119,7 @@ type PrintInfo struct {
|
||||
//连接的客户端,吧每个客户端都放进来
|
||||
type TcpClient struct {
|
||||
Clients map[string]*PrintInfo
|
||||
s sync.RWMutex
|
||||
s *sync.RWMutex
|
||||
}
|
||||
|
||||
type GetPrintStatus struct {
|
||||
@@ -129,6 +129,7 @@ type GetPrintStatus struct {
|
||||
|
||||
func ListenTcp() {
|
||||
tcpClient.Clients = make(map[string]*PrintInfo)
|
||||
tcpClient.s = new(sync.RWMutex)
|
||||
l, err := net.Listen("tcp", ":8000")
|
||||
if err != nil {
|
||||
fmt.Println("listen error:", err)
|
||||
|
||||
Reference in New Issue
Block a user