MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / SentHeaderBytes

Method SentHeaderBytes

internal/nodes/http_writer.go:829–839  ·  view source on GitHub ↗

SentHeaderBytes 计算发送的Header字节数

()

Source from the content-addressed store, hash-verified

827
828// SentHeaderBytes 计算发送的Header字节数
829func (this *HTTPWriter) SentHeaderBytes() int64 {
830 if this.sentHeaderBytes > 0 {
831 return this.sentHeaderBytes
832 }
833 for k, v := range this.Header() {
834 for _, v1 := range v {
835 this.sentHeaderBytes += int64(len(k) + 2 + len(v1) + 1)
836 }
837 }
838 return this.sentHeaderBytes
839}
840
841func (this *HTTPWriter) SetSentHeaderBytes(sentHeaderBytes int64) {
842 this.sentHeaderBytes = sentHeaderBytes

Callers 1

doEndMethod · 0.80

Calls 1

HeaderMethod · 0.95

Tested by

no test coverage detected