|
|
@ -18,15 +18,15 @@ import javax.inject.Singleton |
|
|
|
public class Rs2ChannelInitializer @Inject constructor( |
|
|
|
public class Rs2ChannelInitializer @Inject constructor( |
|
|
|
private val handlerProvider: Provider<LoginChannelHandler>, |
|
|
|
private val handlerProvider: Provider<LoginChannelHandler>, |
|
|
|
@LoginUpstream |
|
|
|
@LoginUpstream |
|
|
|
private val loginUpStreamProtocol: Protocol, |
|
|
|
private val loginUpstreamProtocol: Protocol, |
|
|
|
@LoginDownstream |
|
|
|
@LoginDownstream |
|
|
|
private val loginDownStreamProtocol: Protocol |
|
|
|
private val loginDownstreamProtocol: Protocol |
|
|
|
) : ChannelInitializer<Channel>() { |
|
|
|
) : ChannelInitializer<Channel>() { |
|
|
|
override fun initChannel(ch: Channel) { |
|
|
|
override fun initChannel(ch: Channel) { |
|
|
|
ch.pipeline().addLast( |
|
|
|
ch.pipeline().addLast( |
|
|
|
IdleStateHandler(true, TIMEOUT_SECS, TIMEOUT_SECS, TIMEOUT_SECS, TimeUnit.SECONDS), |
|
|
|
IdleStateHandler(true, TIMEOUT_SECS, TIMEOUT_SECS, TIMEOUT_SECS, TimeUnit.SECONDS), |
|
|
|
Rs2Decoder(loginUpStreamProtocol), |
|
|
|
Rs2Decoder(loginUpstreamProtocol), |
|
|
|
Rs2Encoder(loginDownStreamProtocol), |
|
|
|
Rs2Encoder(loginDownstreamProtocol), |
|
|
|
handlerProvider.get() |
|
|
|
handlerProvider.get() |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|