mirror of
https://github.com/impact-eintr/netstack.git
synced 2025-10-05 21:06:50 +08:00
25 lines
297 B
Go
25 lines
297 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"net"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
go func() {
|
|
_, err := net.Dial("tcp", "192.168.1.1:9999")
|
|
if err != nil {
|
|
fmt.Println("err : ", err)
|
|
return
|
|
}
|
|
}()
|
|
|
|
t := time.NewTimer(500 * time.Millisecond)
|
|
select {
|
|
case <-t.C:
|
|
return
|
|
}
|
|
|
|
}
|