Use AdaptiveRecvBufferAllocator in the example as this is what users usually should do

This commit is contained in:
Norman Maurer committed 2018-01-29 15:01:30 +01:00
1 parent 84a4f2df21
commit 46ac01f517
1 file changed
+1 -1
+1 -1
View File
@@ -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()
}