mirror of
https://github.com/apple/swift-nio
synced 2026-11-28 05:14:23 +00:00
Use AdaptiveRecvBufferAllocator in the example as this is what users usually should do
This commit is contained in:
1 parent
84a4f2df21
commit
46ac01f517
1 file changed
+1
-1
@@ -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()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user