O'Reilly logo

Pro Node.js for Developers by Colin J. Ihrig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

image

Events and Timers

The previous chapter introduced Node's event-driven programming model. This chapter takes a more in-depth look at events and event handling. A solid understanding of event handling will allow you to create sophisticated, event-driven applications, such as web servers. This chapter introduces event emitters—objects used to create new events. After learning how to create events, the chapter turns to event handling. Finally, the chapter wraps up with a discussion of timers and function scheduling in Node.

Event Emitters

In Node, objects that generate events are called event emitters. Creating an event emitter is as simple ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required