网络相关
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.

21 lines
258 B

3 years ago
  1. package network
  2. import (
  3. // "fmt"
  4. "testing"
  5. )
  6. func Test_Ping(t *testing.T) {
  7. str := "10.0.100.10"
  8. ret := Ping(str)
  9. fmt.Println(ret)
  10. }
  11. func Test_CanConnect(t *testing.T) {
  12. ip := "10.0.106.212"
  13. port := ""
  14. ret := CanConnect(ip, port)
  15. t.Log(ret)
  16. }