This commit is contained in:
suyl
2021-06-24 10:54:22 +08:00
parent 1062523b2f
commit 56fb0eb6ad

View File

@@ -1971,14 +1971,12 @@ var (
func connHandler(c net.Conn) {
fmt.Println("Please input data...")
go func() {
for {
s := <-textChan
//写入数据
n, err := c.Write([]byte(s))
if err != nil {
fmt.Println("Write err:", err, n)
return
}
s := <-textChan
//写入数据
n, err := c.Write([]byte(s))
if err != nil {
fmt.Println("Write err:", err, n)
return
}
}()
}