package main
import (
"fmt"
"net"
)
type Bytes []byte
func main() {
conn, err := net.Dial("tcp","192.168.1.77:2701")
if err !=nil{
fmt.Println("连接错误",err)
return
}
defer conn.Close()
p :=Bytes{0xa0,0x01,0x08,0x2b,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xa7}
_, err := conn.Write([]byte(p))
if errr !=nil {
fmt.Println("发送错误:err",err)
return
}
}