Its because Buffer prototype gets extended on every connection and references to the socket which stores information about endianness. On every connection this reference will be set to the new socket, which overwrites the reference also on the old connection. Thats not correct and should be changed by setting the endianness from outside.