Skip to main content
Glama
quit.js575 B
'use strict'; const Command = require('./command.js'); const CommandCode = require('../constants/commands.js'); const Packet = require('../packets/packet.js'); class Quit extends Command { constructor(callback) { super(); this.onResult = callback; } start(packet, connection) { connection._closing = true; const quit = new Packet( 0, Buffer.from([1, 0, 0, 0, CommandCode.QUIT]), 0, 5 ); if (this.onResult) { this.onResult(); } connection.writePacket(quit); return null; } } module.exports = Quit;

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/michael7736/mysql-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server