From 46ac01f517bc7ba656390372fc3f07dfc2fe8b24 Mon Sep 17 00:00:00 2001 From: Norman Maurer Date: Mon, 29 Jan 2018 15:01:30 +0100 Subject: [PATCH] Use AdaptiveRecvBufferAllocator in the example as this is what users usually should do --- Sources/NIOEchoServer/main.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/NIOEchoServer/main.swift b/Sources/NIOEchoServer/main.swift index 640525eab..aefc9abd6 100644 --- a/Sources/NIOEchoServer/main.swift +++ b/Sources/NIOEchoServer/main.swift @@ -57,7 +57,7 @@ let bootstrap = ServerBootstrap(group: group) .childChannelOption(ChannelOptions.socket(IPPROTO_TCP, TCP_NODELAY), value: 1) .childChannelOption(ChannelOptions.socket(SocketOptionLevel(SOL_SOCKET), SO_REUSEADDR), value: 1) .childChannelOption(ChannelOptions.maxMessagesPerRead, value: 16) - .childChannelOption(ChannelOptions.recvAllocator, value: FixedSizeRecvByteBufferAllocator(capacity: 8192)) + .childChannelOption(ChannelOptions.recvAllocator, value: AdaptiveRecvByteBufferAllocator()) defer { try! group.syncShutdownGracefully() }