fitstar/falcore — pull request #20 by dgrijalva (2013-06-13 06:42:15+00:00)
Title: Go1.1 and TCP No Delay

There are several changes here around network behavior in go 1.1:

* use `SetNoDelay` instead of syscall on go 1.1 for TCP_CORK functionality
* rename stub methods to match "no delay" description
* simplify behavior by wrapping response writes in nodelay calls instead of setting it up on the socket and then "cycling" at the end of each response

Unknown:

* what happens on unsupported platforms if you call `SetNoDelay`?
* do we still need to manually flush after switching off cork?
* is there more standard lib behavior we can use to further simplify?
* do we really need the write buffer in the unsupported case?
* should we be recycling those buffers?

Discuss.