Using shared buffer. Added comments. Settings installed to true when buf.Len == 0.