Description
The Reactor currently only supports read-readiness notifications via addHandler with a hardcoded EPOLLIN | EPOLLRDHUP mask. The upcoming proactor implementation requires write-readiness notifications (EPOLLOUT) to support asynchronous write and sendmsg operations. This change introduces addReadHandler / addWriteHandler as explicit replacements for addHandler, adds onWriteable to EventHandler alongside a rename of onReceive to onReadable, and wires everything through the internal command queue and epoll dispatch path.
Acceptance Criteria
- addHandler is replaced by addReadHandler and addWriteHandler
- addWriteHandler registers EPOLLOUT and dispatches to onWriteable
- addReadHandler registers EPOLLIN | EPOLLRDHUP and dispatches to onReadable
- EventHandler::onReceive is renamed to onReadable
- EventHandler::onWriteable is added to EventHandler
- Command carries an events field passed through to registerHandler
- registerHandler accepts an explicit events mask instead of hardcoding EPOLLIN | EPOLLRDHUP
- All existing EventHandler subclasses in libjoin are updated accordingly
- All existing unit tests pass without modification to test logic
- New unit tests cover onWriteable dispatch via addWriteHandler
Description
The Reactor currently only supports read-readiness notifications via addHandler with a hardcoded EPOLLIN | EPOLLRDHUP mask. The upcoming proactor implementation requires write-readiness notifications (EPOLLOUT) to support asynchronous write and sendmsg operations. This change introduces addReadHandler / addWriteHandler as explicit replacements for addHandler, adds onWriteable to EventHandler alongside a rename of onReceive to onReadable, and wires everything through the internal command queue and epoll dispatch path.
Acceptance Criteria