package main import ( "io" "log" "net" "time" ) func main() { listener, err := net.Listen("tcp", "172.17.223.103:8000") if err != nil { log.Fatal(err) } for { conn, err := listener.Accept() if err != nil { log.Print(err) continue } defer conn.Close() for { _, err := io.WriteString(conn, "hello tcp") if err != nil { return } time.Sleep(1 * time.Second) } } }