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
+7.9k Golang : Get today's weekday name and calculate target day distance example
+8.1k Golang : Append and add item in slice
+7.9k Javascript : Put image into Chrome browser's console
+14.4k Golang : Find network of an IP address
+5.2k Python : Create Whois client or function example
+87.7k Golang : How to convert character to ASCII and back
+21.6k Golang : GORM create record or insert new record into database example
+11.1k Golang : Roll the dice example
+14.6k Golang : Missing Bazaar command
+16.8k Golang : Get own process identifier
+6.9k Golang : Decode XML data from RSS feed
+8.9k Golang : GMail API create and send draft with simple upload attachment example