             readerSource.setEventHandler() {
                 _ = self.handleRead()
             }
-            readerSource.setCancelHandler() {
-                self.handleCancel()
-            }
+            readerSource.setCancelHandler(handler: self.handleCancel)
             readerSource.resume()
         #endif
         

    ///        directly.
    public func handleBufferedReadData() {
        #if os(OSX) || os(iOS) || os(tvOS) || os(watchOS) || GCD_ASYNCH
            socketReaderQueue(fd: socket.socketfd).sync() { [unowned self] in
                _ = self.handleBufferedReadDataHelper()
            }
        #endif
    }

            writerSource = DispatchSource.makeWriteSource(fileDescriptor: socket.socketfd,
                                                          queue: IncomingSocketHandler.socketWriterQueue)
            
            writerSource!.setEventHandler(handler: self.handleWriteHelper)
            writerSource!.setCancelHandler() {
                self.writerSource = nil
            }
