Created
February 10, 2014 17:52
-
-
Save caniszczyk/8920827 to your computer and use it in GitHub Desktop.
Bridging Netty and Finagle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object Netty3Transporter { | |
val channelFactory: ChannelFactory = | |
new NioClientSocketChannelFactory( | |
Executor, 1 /*# boss threads*/, WorkerPool, DefaultTimer | |
){ | |
// no-op; unreleasable | |
override def releaseExternalResources() = () | |
} #1 | |
val defaultChannelOptions: Map[String, Object] = Map( | |
"tcpNoDelay" -> java.lang.Boolean.TRUE, | |
"reuseAddress" -> java.lang.Boolean.TRUE #2 | |
) | |
} | |
// #1 Create a new ChannelFactory instance | |
// #2 Set options which are used for new Channels. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment