According to docs [1], you can use
require('fs').FSWatcher<http://nodejs.org/api/fs.html#fs_class_fs_fswatcher>
for watch a file.
If it is available only as file descriptor and you can't change this, i
think it is possible to implement FSWatcher with fd argument.
Ben or Bert should know more about this feature necessity in libuv.
[1]: http://nodejs.org/api/fs.html#fs_fs_watch_filename_options_listener
вторник, 3 июля 2012 г., 22:32:06 UTC+4 пользователь Marc написал:
>
> I already knew this link, Ben. And I applied the changes to the C code.
>
> But there is some JavaScript code like this:
>
> var IOWatcher = process.binding('io_watcher').IOWatcher
>
> this._watcher = new IOWatcher;
> this._watcher.callback = this._flush.bind(this);
> this._watcher.set(this._fd, true, false);
> this._watcher.start();
>
> I don't know how to migrate this.
>
> Am Dienstag, 3. Juli 2012 02:06:59 UTC+2 schrieb Ben Noordhuis:
>>
>> On Mon, Jul 2, 2012 at 11:53 PM, Marc <[email protected]> wrote:
>> > Hi,
>> >
>> > I'm using the https://github.com/JustinTulloss/zeromq.node module. I
>> already
>> > forked the module (https://github.com/snrmwg/zeromq.node) to migrate
>> to
>> > libuv for node >= 0.7.11.
>> > Everything works fine. Since node 0.8 I get following message in the
>> > console:
>> >
>> > WARNING: don't use IOWatcher, it'll be removed in v0.9
>> >
>> > Does anyone know what should be used instead? I could not find any
>> > information.
>> >
>> > Thanks in advance,
>> >
>> > Marc
>>
>> Use the uv_poll_*() functions. Here[1] is a page explaining how to
>> migrate.
>>
>> [1]
>> https://github.com/joyent/node/wiki/How-to-migrate-from-ev_io_*-to-uv_poll_*-for-IO-polling
>>
>>
>
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en