i am using go 1.4.2 and the implementation doesn't seem to have CloseNotifier
as i want to use it in a long polling handler with something like:
func Pollhandler(w http.ResponseWriter, r *http.Request) {
notify := w.(CloseNotifier).CloseNotify()
<-notify //should block until the http connection is closed
}
is the CloseNotifier not implemented for the http ResponseWriter
? if so how can i get around this? or is there any implementation for http ResponseWriter
that implements the CloseNotifier
interface?