Hi!
For a small example server that listens for messages and then broadcasts them to a number of channels, I was pointed to the following problem:
>Also, your broadcasting of msg to all the connections may block. The connection channels are buffered, but a slow listening connection could easily fill up the buffer, thus blocking the send and the whole server. If you have an inner loop, you always want non-blocking channel sends, regardless of the size of the buffer.
Now, is there a way to do a non-blocking send on a channel or is all I can do to increase the buffer size and close the connection if it still is too slow? I don't want to put the send in a goroutine because I want to preserve the order of messages.