anchor.diff:      }
     }
   
  -  void setHandlers({read, write, error, closed, destroyed}) {
  -    eventHandlers[readEvent] = read;
  -    eventHandlers[writeEvent] = write;
  -    eventHandlers[errorEvent] = error;
  -    eventHandlers[closedEvent] = closed;
  -    eventHandlers[destroyedEvent] = destroyed;
  +  void setHandlers(
  +      {void Function()? read,
  +      void Function()? write,
  +      void Function(Object e, StackTrace? st)? error,
  +      void Function()? closed,
  +      void Function()? destroyed}) {
  +    readEventHandler = read;
  +    writeEventHandler = write;
  +    errorEventHandler = error;
  +    closedEventHandler = closed;
  +    destroyedEventHandler = destroyed;
     }
   
     void setListening({bool read = true, bool write = true}) {
  
positive.code:       if (isClosing) return;
        if (!sendWriteEvents) return;
        sendWriteEvents = false;
        var handler = eventHandlers[writeEvent];
        if (handler == null) return;
        handler();
      }
  
negative.code:     int events = eventsObj as int;
      for (int i = firstEvent; i <= lastEvent; i++) {
        if (((events & (1 << i)) != 0)) {
          if (isClosing && i != destroyedEvent) continue;
          switch (i) {
            case readEvent:
              if (isClosedRead) continue;
              if (isListening) {
                connections++;
                if (!isClosed) {
                  // If the connection is closed right after it's accepted, there's a
                  // chance the close-handler is not set.
                  var handler = readEventHandler;
                  if (handler != null) handler();
                }
              } else {
                if (isUdp) {
                  _availableDatagram = nativeAvailableDatagram();
                } else {
                  available = nativeAvailable();
                }
                issueReadEvent();
                continue;
              }
              break;
            case writeEvent:
              writeAvailable = true;
              issueWriteEvent(delayed: false);
              continue;
            case errorEvent:
              if (!isClosing) {
                final osError = nativeGetError();
                if (osError != null) {
                  reportError(osError, null, osError.message);
                } else {
                  reportError(
                      Error(),
                      StackTrace.current,
                      "Error event raised in event handler : "
                      "error condition has been reset");
                }
              }
              break;
            case closedEvent:
              if (isClosedRead) continue;
              if (!isListening && !isClosing && !isClosed) {
                isClosedRead = true;
                issueReadEvent();
                continue;
              } else if (!isClosed) {
                // If the connection is closed right after it's accepted, there's a
                // chance the close-handler is not set.
                var handler = closedEventHandler;
                if (handler != null) handler();
              }
              break;
            case destroyedEvent:
              assert(isClosing);
              assert(!isClosed);
              isClosed = true;
              closeCompleter.complete();
              disconnectFromEventHandler();
              var handler = destroyedEventHandler;
              if (handler != null) handler();
              continue;
          }
        }
      }
  