I think that in principle you are correct to perform your reads inside a
goroutine, to allow them to be received asynchronously.
If Read() blocks, it's not a problem unless you want to shut down the
connection from the server side, and you can do that by setting a read
timeout which will unblock the read:
go func() {
select {
case <-RecieverClose: // sic
conn.SetReadDeadline(time.Now())
}
}()
--
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 protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/459f0bf2-d66e-43c8-88e8-1f18dc39f986n%40googlegroups.com.