GameLoginResponseHandler

class GameLoginResponseHandler<R>(val networkService: NetworkService<R>, val ctx: ChannelHandlerContext)

A response handler for login requests, allowing the server to write either a successful or a failed login response, depending on the server's decision.

Constructors

Link copied to clipboard
constructor(networkService: NetworkService<R>, ctx: ChannelHandlerContext)

Properties

Link copied to clipboard
val ctx: ChannelHandlerContext

the channel handler context to write the response to

Link copied to clipboard

the main network service god object

Functions

Link copied to clipboard
fun writeFailedResponse(response: LoginResponse)

Writes a failed response to the client. This is all requests that aren't the ok response, even ones where technically it's correct - this is because the client always makes a new connection to re-request the login, nothing is kept open over long periods of time.

Link copied to clipboard
fun writeSuccessfulResponse(response: LoginResponse.Ok, loginBlock: LoginBlock<*>): Session<R>?

Writes a successful login response to the client.

fun writeSuccessfulResponse(response: LoginResponse.ReconnectOk, loginBlock: LoginBlock<*>): Session<R>?