diff options
author | Robey Pointer <robey@lag.net> | 2008-07-06 17:23:55 -0700 |
---|---|---|
committer | Robey Pointer <robey@lag.net> | 2008-07-06 17:23:55 -0700 |
commit | 97ea105d4e143a6a21ed1b2338553e514b5d6132 (patch) | |
tree | 47572ebbdff58eb463d6642ca18798b2918fe4f6 | |
parent | 035766fab0c3e4794f6e43d0988848604b12bf36 (diff) |
[project @ robey@lag.net-20080707002355-kl44yurqgjfhk7dd]
clarify documentation about non-blocking mode
-rw-r--r-- | paramiko/channel.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/paramiko/channel.py b/paramiko/channel.py index f13394de..910a03c5 100644 --- a/paramiko/channel.py +++ b/paramiko/channel.py @@ -496,17 +496,19 @@ class Channel (object): """ Set blocking or non-blocking mode of the channel: if C{blocking} is 0, the channel is set to non-blocking mode; otherwise it's set to blocking - mode. Initially all channels are in blocking mode. + mode. Initially all channels are in blocking mode. In non-blocking mode, if a L{recv} call doesn't find any data, or if a L{send} call can't immediately dispose of the data, an error exception - is raised. In blocking mode, the calls block until they can proceed. + is raised. In blocking mode, the calls block until they can proceed. An + EOF condition is considered "immediate data" for L{recv}, so if the + channel is closed in the read direction, it will never block. C{chan.setblocking(0)} is equivalent to C{chan.settimeout(0)}; C{chan.setblocking(1)} is equivalent to C{chan.settimeout(None)}. @param blocking: 0 to set non-blocking mode; non-0 to set blocking - mode. + mode. @type blocking: int """ if blocking: |