Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UvDriver.php

function UvDriver::getStreamCallbackFlags

3 calls to UvDriver::getStreamCallbackFlags()
UvDriver::activate in vendor/revolt/event-loop/src/EventLoop/Driver/UvDriver.php
Activates (enables) all the given callbacks.
UvDriver::deactivate in vendor/revolt/event-loop/src/EventLoop/Driver/UvDriver.php
Deactivates (disables) the given callback.
UvDriver::__construct in vendor/revolt/event-loop/src/EventLoop/Driver/UvDriver.php

File

vendor/revolt/event-loop/src/EventLoop/Driver/UvDriver.php, line 249

Class

UvDriver

Namespace

Revolt\EventLoop\Driver

Code

private function getStreamCallbackFlags(StreamCallback $callback) : int {
    if ($callback instanceof StreamWritableCallback) {
        return \UV::WRITABLE;
    }
    if ($callback instanceof StreamReadableCallback) {
        return \UV::READABLE;
    }
    throw new \Error('Invalid callback type');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal