pull.js 523 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * Module dependencies.
  3. */
  4. var Socket = require('./sock');
  5. /**
  6. * Expose `PullSocket`.
  7. */
  8. module.exports = PullSocket;
  9. /**
  10. * Initialize a new `PullSocket`.
  11. *
  12. * @api private
  13. */
  14. function PullSocket() {
  15. Socket.call(this);
  16. // TODO: selective reception
  17. }
  18. /**
  19. * Inherits from `Socket.prototype`.
  20. */
  21. PullSocket.prototype.__proto__ = Socket.prototype;
  22. /**
  23. * Pull sockets should not send messages.
  24. */
  25. PullSocket.prototype.send = function(){
  26. throw new Error('pull sockets should not send messages');
  27. };