Golang net/textproto.Pipeline type and EndRequest() function example
package net/textproto
Golang net/textproto.Pipeline type and EndRequest() function usage example
From http://golang.org/src/net/http/httputil/persist.go
id := sc.pipe.Next()
sc.pipe.StartRequest(id)
defer func() {
sc.pipe.EndRequest(id)
if req == nil {
sc.pipe.StartResponse(id)
sc.pipe.EndResponse(id)
} else {
// Remember the pipeline id of this request
sc.lk.Lock()
sc.pipereq[req] = id
return ErrPipeline
}
References :
http://golang.org/pkg/net/textproto/#Pipeline
Advertisement
Something interesting
Tutorials
+4k Golang : A program that contain another program and executes it during run-time
+17k Golang : Get command line arguments
+9.8k Golang : Replace a parameter's value inside a configuration file example
+5.9k Golang : Get expvar(export variables) to work with multiplexer
+7.6k Python : Fix SyntaxError: Non-ASCII character in file, but no encoding declared
+7.5k Golang : How to check if input string is a word?
+6.4k Golang : Dealing with postal or zip code example
+5.6k Golang : Convert an executable file into []byte example
+15.2k Golang : Get IP addresses of a domain name
+26.9k Golang : Change a file last modified date and time
+17.6k Unmarshal/Load CSV record into struct in Go
+29.6k Golang : Download file example