|
Caleb Doxsey |
at Mar 14, 2013 at 5:21 am
|
⇧ |
| |
The issue with your code is you are not adding the chunked transfer
encoding headers:
http://en.wikipedia.org/wiki/Chunked_transfer_encodingWhen you hijack the connection none of the HTTP magic is done for you
anymore. A good strategy for problems like this is to use a program like
Wireshark to see what the actual bytes being sent are. (So in this case you
could run the two examples and compare how they differ)
On Wednesday, March 13, 2013 7:09:32 AM UTC-7, mic...@zeto.wroc.pl wrote:I try to send messages from a server to a web browser.
http://play.golang.org/p/ifxCi2dD7lWhen I use handler h1, then server sends messages to browser infinitely
often (1msg/sec.)
When I use handler h2, then I get error (connection lost) after 26
iterations.
What is wrong with handler h2 ?
michal
--
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 golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.