main_test.go 469 B

1234567891011121314151617
  1. package yu_tcp
  2. import (
  3. "fmt"
  4. yu_proxy "gogs.qqck.cn/s/tools/proxy"
  5. "testing"
  6. )
  7. func Test(t *testing.T) {
  8. j_tcp := New()
  9. defer j_tcp.Close()
  10. j_tcp.SetProxy(yu_proxy.NewInfo().SetHost("127.0.0.1").SetPort(808).SetHttp().SetTimeout(-1))
  11. // fmt.Println(j_tcp.SetHost("fe80::fd70:67ee:a6a2:52e%18").SetPort(65522).Connect())
  12. // fmt.Println(j_tcp.SetHost("127.0.0.1").SetPort(65522).Connect())
  13. fmt.Println(j_tcp.SetHost("www.baidu.com").SetPort(80).Connect())
  14. }