Skip to content

Commit

Permalink
Enhance documentation for socket.poll()
Browse files Browse the repository at this point in the history
  • Loading branch information
nehpetsde committed Jun 10, 2017
1 parent 82f0c70 commit dda19e3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/nfc/llcp/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,19 @@ def recvfrom(self):
return self.llc.recvfrom(self._tco)

def poll(self, event, timeout=None):
"""Wait for a socket event."""
"""Wait for a socket event. Posssible *event* values are the strings
"recv", "send" and "acks". Whent the timeout is present and
not :const:`None`, it should be a floating point number
specifying the timeout for the operation in seconds (or
fractions thereof). For "recv" or "send" the :meth:`poll`
method returns :const:`True` if a next :meth:`recv` or
:meth:`send` operation would be non-blocking. The "acks" event
may only be used with a data-link-connection type socket; the
call then returns :const:`True` if the counter of received
acknowledgements was greater than zero and decrements the
counter by one.
"""
return self.llc.poll(self._tco, event, timeout)

def getsockname(self):
Expand Down

0 comments on commit dda19e3

Please sign in to comment.