数据 输入输出 处理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

25 lines
384 B

package testUnit
import (
"goInOut/dbOperate"
"strconv"
"testing"
"time"
)
func TestUDP_push(t *testing.T) {
udp := dbOperate.UdpHelper{
Host: "10.8.30.110",
Port: 8888,
}
udp.Initial()
udp.Publish([]byte("123456"))
var bytes []byte
for i := 0; i < 5; i++ {
bytes = append(bytes, strconv.Itoa(i)...)
udp.Publish(bytes)
time.Sleep(time.Second)
}
udp.Close()
}