liveBook · Manning

Handler

As explained in Grokking Concurrency

An event handler is a function or component that processes an event from a particular source or event type.

An event handler is a callback that processes an event or request from a particular source. In an event loop, the reactor routes each ready event to its registered handler. section 11.0 section 11.6

Handlers in a server

_on_accept handles a new connection, _on_read handles a client message, and _on_write handles sending a message to a client. section 11.6

How Grokking Concurrency covers it

How deep it goes
Defines handlers as callbacks and identifies three socket-related roles, without detailing their implementations.
Examples
Uses _on_accept, _on_read, and _on_write for connection acceptance, client messages, and client writes.
What you can do after
Understand how to associate callbacks with specific events and sources.
How it connects
Connects handlers to callbacks, event sources, event loops, and the reactor pattern.

Also explained in

Compare how 22 books explain handler →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Concurrency. The section links point to the parts of the book it draws on.