We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi in the documentation can you give an example for how to use polling?
The text was updated successfully, but these errors were encountered:
Basically you pass a callback to event-cb that's passed a list of events you specify.
event-cb
(cffi:defcfun ("read" c-read) :int (fd :int) (buf :pointer) (count :unsigned-int)) (as:poll 0 (lambda (event) (assert (equal event '(:readable))) (cffi:with-foreign-object (buf :char 50) (let ((nbytes (c-read 0 buf 50))) (format t "~d bytes recieved: ~A~&" nbytes (cffi:foreign-string-to-lisp buf))))) :poll-for '(:readable))
Sorry, something went wrong.
No branches or pull requests
Hi in the documentation can you give an example for how to use polling?
The text was updated successfully, but these errors were encountered: