Skip to content

Commit

Permalink
[add-pollitem-sock-accessor] Add and export poll-item-sock to get a…
Browse files Browse the repository at this point in the history
… sock

from a pollitem struct.
  • Loading branch information
sshirokov committed Jan 31, 2012
1 parent ec61518 commit 045adfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/packages.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

:send :recv
:with-poll-items
:poll-item-sock
:poll-items-aref :do-poll-items :poll-item-events-signaled-p
:poll

Expand Down
4 changes: 4 additions & 0 deletions src/zmq.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,10 @@ ITEMS."
(/= (logand (foreign-slot-value poll-item 'pollitem 'revents)
(foreign-bitfield-value 'event-types events)) 0))

(defun poll-item-sock (poll-item)
"Return the `socket' of the given `poll-item'"
(foreign-slot-value poll-item 'pollitem 'socket))

(defun poll (items nb-items timeout)
"Poll ITEMS with a timeout of TIMEOUT microseconds, -1 meaning no time
limit. Return the number of items with signaled events."
Expand Down

0 comments on commit 045adfe

Please sign in to comment.