Templated the network buffer's reading method.