Wrap the WebSocket connection in an 8KB bufio.Reader so that small reads (2-byte frame headers, length extensions) are served from buffer instead of making individual syscalls.