I am getting the error panic: too many concurrent operations on a single file or socket (max 1048575)
the code is :
for {
buffer := make([]byte, 8)
n, addr, err := c.ReadFromUDP(buffer)
if err !=nil {
fmt.Println(err)
fmt.Println(buffer)
}
fmt.Print("-> ", string(buffer[0:n-1]))
if strings.TrimSpace(string(buffer[0:n])) == "STOP" {
fmt.Println("Exiting UDP server!")
return
}
fmt.Println("address ",addr)
data := []byte("la");
_, err = c.WriteToUDP(data, addr)
if err != nil{
fmt.Println(err)
}
}