Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for smbclient_notify #29

Open
icewind1991 opened this issue Sep 21, 2015 · 6 comments
Open

Add support for smbclient_notify #29

icewind1991 opened this issue Sep 21, 2015 · 6 comments

Comments

@icewind1991
Copy link

The smbclient notify command allows clients to get notified whenever a file or folder is changed on the server.

From what I can tell this functionality is exposed as smbc_setFunctionNotify in libsmbclient in newer versions of smbclient

@eduardok
Copy link
Owner

hmm, ok, I will try to take a look at this soon, a bit busy this week as I will move next week.

@aklomp
Copy link
Collaborator

aklomp commented Sep 23, 2015

smbc_notify was added to libsmbclient.h on June 26, 2015. I wonder how it should be implemented for PHP, since the notifications come asynchronously through callbacks. You'd have to register a PHP callback function with the library.

@remicollet
Copy link
Contributor

I think such callback make sense in long running process (CLI), not really in web env.

@eduardok
Copy link
Owner

Well, it would be nice if it kept the notifications on a queue for later consumption (with a configurable timeout, etc), but that means more code in samba :P
What options do we have ?

@aklomp
Copy link
Collaborator

aklomp commented Sep 23, 2015

Well, PHP can also be (ab)used as a tool to write CLI programs/daemons, so adding notify support is not totally crazy. I just wonder how hard it is to hook into the PHP event loop and issue a callback. It's certainly something that I have no experience with.

@remicollet
Copy link
Contributor

Notice: the pecl/inotify ext use the "queue" way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants