Esempio n. 1
0
        public IOWatcher(IntPtr fd, EventTypes types, Loop loop, IOWatcherCallback callback)
            : base(loop)
        {
            this.fd = fd;
            this.callback = callback;

            unmanaged_watcher = new UnmanagedIOWatcher ();

            unmanaged_watcher.fd = fd.ToInt32 ();
            unmanaged_watcher.events = types | EventTypes.EV__IOFDSET;

            unmanaged_watcher.callback = CallbackFunctionPtr;

            InitializeUnmanagedWatcher (unmanaged_watcher);
        }