able to handle complete datagrams.
This output module will write data to a FileHandle object using a given \a Writer. This
- output module is passive. This implies, that the output handle may not block. This also
- implies, that data will probably get lost if written to fast for the underlying transport
- mechanism. Either this is desired (like for a UDP socket) or some additional bandwidth
- shaping needs to be used.
+ output module is passive. This implies, that <em>the output handle may not block</em>. This
+ also implies, that data will probably get lost if written to fast for the underlying
+ transport mechanism. Either this is desired (like for a UDP socket) or some additional
+ bandwidth shaping needs to be used.
The default \a Writer is senf::ppi::ConnectedDgramWriter which will write out the complete packet to
the file handle.
{
static epoll_event events[NumEvents];
int rv (0);
- for (;;) {
- rv = epoll_wait(epollFd_, events, NumEvents, timeout_);
- if (rv == -1) {
- if (errno == EINTR)
- continue;
+ rv = epoll_wait(epollFd_, events, NumEvents, timeout_);
+ if (rv == -1) {
+ if (errno == EINTR)
+ rv = 0;
+ else
SENF_THROW_SYSTEM_EXCEPTION("epoll_wait()");
- }
- break;
}
return boost::make_iterator_range(
boost::make_transform_iterator(events, GetPollResult()),