JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::LinuxEventLoop Namespace Reference

Functions

void registerFdCallback (int fd, std::function< void(int)> readCallback, short eventMask=1)
 Registers a callback that will be called when a file descriptor is ready for I/O. More...
 
void unregisterFdCallback (int fd)
 Unregisters a previously registered file descriptor. More...
 

Function Documentation

◆ registerFdCallback()

void juce::LinuxEventLoop::registerFdCallback ( int  fd,
std::function< void(int)>  readCallback,
short  eventMask = 1 
)

Registers a callback that will be called when a file descriptor is ready for I/O.

This will add the given file descriptor to the internal set of file descriptors that will be passed to the poll() call. When this file descriptor has data to read the readCallback will be called.

Parameters
fdthe file descriptor to be monitored
readCallbacka callback that will be called when the file descriptor has data to read. The file descriptor will be passed as an argument
eventMaska bit mask specifying the events you are interested in for the file descriptor. The possible values for this are defined in <poll.h>

◆ unregisterFdCallback()

void juce::LinuxEventLoop::unregisterFdCallback ( int  fd)

Unregisters a previously registered file descriptor.

See also
registerFdCallback