"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.UDPModeOffPacket = exports.UDPModeOnPacket = exports.VersionPacket = exports.UDPTestPacket = exports.LatencyInfoPacket = exports.PongPacket = exports.PingPacket = void 0;
const ModLoaderDefaultImpls_1 = require("modloader64_api/ModLoaderDefaultImpls");
class PingPacket extends ModLoaderDefaultImpls_1.UDPPacket {
    timestamp = Date.now();
    constructor(lobby) {
        super('PingPacket', 'CORE', lobby, false);
    }
    setType(type) {
        this.socketType = type;
        return this;
    }
}
exports.PingPacket = PingPacket;
class PongPacket extends ModLoaderDefaultImpls_1.UDPPacket {
    serverTime;
    timestamp = Date.now();
    constructor(serverTime, lobby) {
        super('PongPacket', 'CORE', lobby, false);
        this.serverTime = serverTime;
    }
    setType(type) {
        this.socketType = type;
        return this;
    }
}
exports.PongPacket = PongPacket;
class LatencyInfoPacket extends ModLoaderDefaultImpls_1.Packet {
    ping;
    roundtrip;
    constructor(lobby, ping, roundtrip) {
        super('LatencyInfoPacket', 'CORE', lobby, false);
        this.ping = ping;
        this.roundtrip = roundtrip;
    }
}
exports.LatencyInfoPacket = LatencyInfoPacket;
class UDPTestPacket extends ModLoaderDefaultImpls_1.UDPPacket {
    constructor() {
        super('UDPTestPacket', 'ModLoader64', 'TEST_LOBBY_PLEASE_IGNORE', false);
    }
}
exports.UDPTestPacket = UDPTestPacket;
class VersionPacket {
    ml;
    plugins;
    core;
    discord;
    constructor(ml, plugins, core, discord) {
        this.ml = ml;
        this.plugins = plugins;
        this.core = core;
        this.discord = discord;
    }
}
exports.VersionPacket = VersionPacket;
class UDPModeOnPacket extends ModLoaderDefaultImpls_1.UDPPacket {
    constructor(lobby) {
        super('UDPModeOnPacket', 'CORE', lobby, false);
    }
}
exports.UDPModeOnPacket = UDPModeOnPacket;
class UDPModeOffPacket extends ModLoaderDefaultImpls_1.Packet {
    constructor(lobby) {
        super('UDPModeOffPacket', 'CORE', lobby, false);
    }
}
exports.UDPModeOffPacket = UDPModeOffPacket;
//# sourceMappingURL=NetworkingPackets.js.map