Menu
Reference
- Manticore\Ds
- Async
- Http
- Http\WebSocket
- Buffer
- Process
- Io\Poll
- Interfaces
- Handle
- Classes
- BackendUnavailableException
- Context
- FailedContextInitializationException
- FailedHandleAddException
- FailedPollOperationException
- FailedPollWaitException
- FailedWatcherModificationException
- HandleAlreadyWatchedException
- InactiveWatcherException
- InvalidHandleException
- PollException
- Watcher
- Enums
- Backend
- Event
- Manticore\Sapi
- Ffi
Backend
enum
enum Backend
An I/O readiness mechanism for a {@see Context}.
Auto chooses the platform's reactor: epoll on Linux, kqueue on Darwin and BSD. Poll (poll(2)) is available everywhere. EventPorts and WSAPoll are never available in this implementation.
Cases
Auto | | Pick the best backend for the platform. |
Poll | | poll(2); level-triggered only, always available. |
Epoll | | Linux epoll; available on Linux only. |
Kqueue | | kqueue; available on Darwin and BSD. |
EventPorts | | Solaris event ports; not supported. |
WSAPoll | | Windows WSAPoll; not supported. |
Methods
isAvailable() | Whether this backend can be used on the current platform. |
supportsEdgeTriggering() | Whether the backend supports {@see Event::EdgeTriggered}. |
getAvailableBackends() | Lists the concrete backends usable on this host. |
isAvailable()#source
function isAvailable(): bool
Whether this backend can be used on the current platform.
Returns
bool — true if a {@see Context} can be created with it
supportsEdgeTriggering()#source
function supportsEdgeTriggering(): bool
Whether the backend supports {@see Event::EdgeTriggered}.
Returns
bool — true for Epoll and Kqueue, false for Poll
getAvailableBackends()#source
static function getAvailableBackends(): array
Lists the concrete backends usable on this host.
Poll is always first; Auto is never included.
Returns
Backend[] — the concrete (non-Auto) backends available on this host