Quit.js 431 B

12345678910111213141516171819
  1. var Sequence = require('./Sequence');
  2. var Util = require('util');
  3. var Packets = require('../packets');
  4. module.exports = Quit;
  5. Util.inherits(Quit, Sequence);
  6. function Quit(options, callback) {
  7. if (!callback && typeof options === 'function') {
  8. callback = options;
  9. options = {};
  10. }
  11. Sequence.call(this, options, callback);
  12. }
  13. Quit.prototype.start = function() {
  14. this.emit('packet', new Packets.ComQuitPacket);
  15. };