diff --git a/game/src/main/kotlin/org/openrs2/game/net/crossdomain/CrossDomainChannelHandler.kt b/game/src/main/kotlin/org/openrs2/game/net/crossdomain/CrossDomainChannelHandler.kt index da3a905c2a..fa09f9aca0 100644 --- a/game/src/main/kotlin/org/openrs2/game/net/crossdomain/CrossDomainChannelHandler.kt +++ b/game/src/main/kotlin/org/openrs2/game/net/crossdomain/CrossDomainChannelHandler.kt @@ -12,7 +12,7 @@ import org.openrs2.buffer.use import org.openrs2.game.net.http.Http @ChannelHandler.Sharable -public object CrossDomainChannelHandler : SimpleChannelInboundHandler() { +public object CrossDomainChannelHandler : SimpleChannelInboundHandler(HttpRequest::class.java) { private const val ENDPOINT = "/crossdomain.xml" private val POLICY = """ diff --git a/game/src/main/kotlin/org/openrs2/game/net/http/HttpChannelHandler.kt b/game/src/main/kotlin/org/openrs2/game/net/http/HttpChannelHandler.kt index 553680652a..7e04fe8653 100644 --- a/game/src/main/kotlin/org/openrs2/game/net/http/HttpChannelHandler.kt +++ b/game/src/main/kotlin/org/openrs2/game/net/http/HttpChannelHandler.kt @@ -16,7 +16,7 @@ import javax.inject.Singleton @ChannelHandler.Sharable public class HttpChannelHandler @Inject constructor( private val fileProvider: FileProvider -) : SimpleChannelInboundHandler() { +) : SimpleChannelInboundHandler(HttpRequest::class.java) { override fun channelActive(ctx: ChannelHandlerContext) { ctx.read() } diff --git a/game/src/main/kotlin/org/openrs2/game/net/jaggrab/JaggrabChannelHandler.kt b/game/src/main/kotlin/org/openrs2/game/net/jaggrab/JaggrabChannelHandler.kt index 1f3df46025..b9c7f9b151 100644 --- a/game/src/main/kotlin/org/openrs2/game/net/jaggrab/JaggrabChannelHandler.kt +++ b/game/src/main/kotlin/org/openrs2/game/net/jaggrab/JaggrabChannelHandler.kt @@ -15,7 +15,7 @@ import javax.inject.Singleton @ChannelHandler.Sharable public class JaggrabChannelHandler @Inject constructor( private val fileProvider: FileProvider -) : SimpleChannelInboundHandler() { +) : SimpleChannelInboundHandler(JaggrabRequest::class.java) { override fun handlerAdded(ctx: ChannelHandlerContext) { ctx.read() } diff --git a/game/src/main/kotlin/org/openrs2/game/net/js5/Js5ChannelHandler.kt b/game/src/main/kotlin/org/openrs2/game/net/js5/Js5ChannelHandler.kt index d3f676ab67..d40c117b41 100644 --- a/game/src/main/kotlin/org/openrs2/game/net/js5/Js5ChannelHandler.kt +++ b/game/src/main/kotlin/org/openrs2/game/net/js5/Js5ChannelHandler.kt @@ -9,7 +9,7 @@ import javax.inject.Inject public class Js5ChannelHandler @Inject constructor( private val service: Js5Service -) : SimpleChannelInboundHandler() { +) : SimpleChannelInboundHandler(Js5Request::class.java) { private lateinit var client: Js5Client override fun handlerAdded(ctx: ChannelHandlerContext) { diff --git a/game/src/main/kotlin/org/openrs2/game/net/login/LoginChannelHandler.kt b/game/src/main/kotlin/org/openrs2/game/net/login/LoginChannelHandler.kt index d55c029a11..6d74b4bac1 100644 --- a/game/src/main/kotlin/org/openrs2/game/net/login/LoginChannelHandler.kt +++ b/game/src/main/kotlin/org/openrs2/game/net/login/LoginChannelHandler.kt @@ -29,7 +29,7 @@ import javax.inject.Provider public class LoginChannelHandler @Inject constructor( private val js5HandlerProvider: Provider, private val jaggrabHandler: JaggrabChannelHandler -) : SimpleChannelInboundHandler() { +) : SimpleChannelInboundHandler(LoginRequest::class.java) { override fun channelActive(ctx: ChannelHandlerContext) { ctx.read() }