/**
 * @inheritDoc
 *
 * Default IListener implementation.
 */
var DefaultListener = /** @class */ (function () {
    function DefaultListener(emitter) {
        this.emitter = emitter;
    }
    /**
     * @inheritDoc
     */
    DefaultListener.prototype.onConnected = function () {
        if (this.emitter && this.emitter.onConnected) {
            this.emitter.onConnected();
        }
    };
    /**
     * @inheritDoc
     */
    DefaultListener.prototype.onConnectionLost = function () {
        if (this.emitter && this.emitter.onConnectionLost) {
            this.emitter.onConnectionLost();
        }
    };
    /**
     * @inheritDoc
     */
    DefaultListener.prototype.onDisconnected = function () {
        if (this.emitter && this.emitter.onDisconnected) {
            this.emitter.onDisconnected();
        }
    };
    /**
     * @inheritDoc
     */
    DefaultListener.prototype.onError = function (error) {
        if (this.emitter && this.emitter.onError) {
            this.emitter.onError(error);
        }
    };
    /**
     * @inheritDoc
     */
    DefaultListener.prototype.onMessage = function (data) {
        if (this.emitter && this.emitter.onMessage) {
            this.emitter.onMessage(data);
        }
    };
    /**
     * @inheritDoc
     */
    DefaultListener.prototype.onPacketSend = function (packet) {
        if (this.emitter && this.emitter.onPacketSend) {
            this.emitter.onPacketSend(packet);
        }
    };
    return DefaultListener;
}());
export { DefaultListener };
//# sourceMappingURL=DefaultListener.js.map