Skip to main content
The Deno 2 Release Candidate is here
Learn more
class NotifierCallbacks
import { NotifierCallbacks } from "https://deno.land/x/sptaki@1.2.0/callbacks/NotifierCallbacks.d.ts";

Constructors

new
NotifierCallbacks(
httpServerHelper: HttpServerHelper,
httpResponse: HttpResponseUtil,
jsonUtil: JsonUtil,
notifierController: NotifierController,
)

Properties

protected
httpResponse: HttpResponseUtil
protected
httpServerHelper: HttpServerHelper
protected
jsonUtil: JsonUtil
protected
notifierController: NotifierController

Methods

Handle client/notifier/channel/create

getNotifier(
url: string,
info: any,
sessionID: string,
): IGetBodyResponseData<any[]>

Handle push/notifier/getwebsocket

notify(
url: string,
info: any,
sessionID: string,
): string

Handle client/game/profile/select

sendNotification(
sessionID: string,
req: any,
resp: any,
data: any,
): void

If we don't have anything to send, it's ok to not send anything back because notification requests can be long-polling. In fact, we SHOULD wait until we actually have something to send because otherwise we'd spam the client and the client would abort the connection due to spam.