MCPcopy Create free account
hub / github.com/apache/trafficserver / str

Method str

include/proxy/ProxySession.h:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 ProxyError() {}
53 ProxyError(ProxyErrorClass cl, uint32_t co) : cls(cl), code(co) {}
54 size_t
55 str(char *buf, size_t buf_len) const
56 {
57 size_t len = 0;
58
59 if (this->cls == ProxyErrorClass::NONE) {
60 buf[0] = '-';
61 return 1;
62 }
63
64 buf[0] = (this->cls == ProxyErrorClass::SSN) ? 'S' : 'T';
65 ++len;
66
67 len += snprintf(buf + len, buf_len - len, "%" PRIx32, this->code);
68
69 return len;
70 }
71
72 ProxyErrorClass cls = ProxyErrorClass::NONE;
73 uint32_t code = 0;

Callers 2

viewFormatFunction · 0.45
toStringFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected