MCPcopy Create free account
hub / github.com/cuberite/cuberite / WriteVarUTF8String

Method WriteVarUTF8String

src/ByteBuffer.cpp:629–640  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627
628
629bool cByteBuffer::WriteVarUTF8String(const AString & a_Value)
630{
631 CHECK_THREAD;
632 CheckValid();
633 PUTBYTES(a_Value.size() + 1); // This is a lower-bound on the bytes that will be actually written. Fail early.
634 bool res = WriteVarInt(a_Value.size());
635 if (!res)
636 {
637 return false;
638 }
639 return WriteBuf(a_Value.data(), a_Value.size());
640}
641
642
643

Callers 2

HandleClientHandshakeMethod · 0.45

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected