Open-source multiplayer game server compatible with the RuneScape client
https://www.openrs2.org/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
754 B
24 lines
754 B
package org.openrs2.game.net
|
|
|
|
import io.netty.channel.Channel
|
|
import io.netty.channel.ChannelInitializer
|
|
import org.openrs2.game.net.login.LoginChannelHandler
|
|
import org.openrs2.protocol.Protocol
|
|
import org.openrs2.protocol.Rs2Decoder
|
|
import org.openrs2.protocol.Rs2Encoder
|
|
import javax.inject.Inject
|
|
import javax.inject.Provider
|
|
import javax.inject.Singleton
|
|
|
|
@Singleton
|
|
public class Rs2ChannelInitializer @Inject constructor(
|
|
private val handlerProvider: Provider<LoginChannelHandler>
|
|
) : ChannelInitializer<Channel>() {
|
|
override fun initChannel(ch: Channel) {
|
|
ch.pipeline().addLast(
|
|
Rs2Decoder(Protocol.LOGIN_UPSTREAM),
|
|
Rs2Encoder(Protocol.LOGIN_DOWNSTREAM),
|
|
handlerProvider.get()
|
|
)
|
|
}
|
|
}
|
|
|