如何在Go中确定与流的连接是否断开?

The following code listens to a stream.

func listen() {
  conn, err := net.Dial("udp", "127.0.0.1:10001")
  checkError(err)

  conn.Write([]byte("PROCEED"))

  for {
    s := make([]byte, 1024)
    conn.Read(s)
    data := string(s)

    if len(data) > 0 {
      go processData(data)
    } else {
      fmt.Println("No bytes received!!!")
    }
  }
}

How can I know in the for loop if my connection is broken?