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

Function append_protocol

src/iocore/net/SSLNextProtocolSet.cc:41–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39// not say how many bytes the length is. For the record, it's 1.
40
41unsigned char *
42append_protocol(const char *proto, unsigned char *buf)
43{
44 size_t sz = strlen(proto);
45 *buf++ = static_cast<unsigned char>(sz);
46 memcpy(buf, proto, sz);
47 return buf + sz;
48}
49
50bool
51SSLNextProtocolSet::create_npn_advertisement(const SessionProtocolSet &enabled, unsigned char **npn, size_t *len) const

Callers 1

Calls 1

memcpyFunction · 0.50

Tested by

no test coverage detected