i want to write some code for UDP server to prevent it from receiveing
buffer overflows... i have run across this example:
b := bytes.NewBuffer(nil)
go io.Copy(b, c)
Basically it copies data received from socket to a new buffer, the question
if how much data it'll read before stopping to "take" new input, eg. it'll
copy data from c to b indefinitely, untill b fills up, wich is max size of
data that can stay in b before the read operation on c will block?
Or is it preferred to use this code:
sock, _ := net.ListenUDP("udp", addr)
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
For more options, visit https://groups.google.com/d/optout.