Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
6c6d6627
Commit
6c6d6627
authored
Jun 06, 2002
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some markup errors and adjust wording slightly.
parent
be946bfe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
Doc/lib/libsocket.tex
Doc/lib/libsocket.tex
+15
-15
No files found.
Doc/lib/libsocket.tex
View file @
6c6d6627
...
...
@@ -515,27 +515,27 @@ block until they can proceed.
\end{methoddesc}
\begin{methoddesc}
[socket]
{
settimeout
}{
value
}
Set a timeout on blocking socket operations. Value can be any numeric
value
or
\var
{
None
}
. Socket operations will raise an
\exception
{
error
}
exceptio
n
if the timeout period
\var
{
value
}
has elapsed before the operation
has
completed. Setting a timeout of
\var
{
None
}
disables timeouts on socket
operations.
Set a timeout on blocking socket operations. Value can be any numeric
value or
\code
{
None
}
. Socket operations will raise a
n
\exception
{
error
}
exception if the timeout period
\var
{
value
}
has
elapsed before the operation has completed. Setting a timeout of
\code
{
None
}
disables timeouts on socket
operations.
\end{methoddesc}
\begin{methoddesc}
[socket]
{
gettimeout
}{}
Returns the timeout in floating seconds associated with socket
operations.
A timeout of None indicates that timeouts on socket operations are
disabled.
Returns the timeout in floating seconds associated with socket
operations. A timeout of
\code
{
None
}
indicates that timeouts on
socket operations are
disabled.
\end{methoddesc}
Some notes on the interaction between socket blocking and timeouts:
socket blocking mode takes precendence over timeouts. If a socket
if set to non-blocking mode, then timeouts set on sockets are never
don't mean anything. The timeout value associated with the socket
can still be set via settimeout and its value retrieved via gettimeout,
but the timeout is never enforced (i.e, an exception will never be
thrown). Otherwise, if the socket is in blocking mode, setting the
timeout will raise an exception as expected.
socket blocking mode takes precendence over timeouts. If a socket
if
set to non-blocking mode, then timeouts set on sockets are not used.
The timeout value associated with the socket can still be set using
\method
{
settimeout()
}
and its value retrieved using
\method
{
gettimeout()
}
, but the timeout is never enforced (an exception
will never be thrown). Otherwise, if the socket is in blocking mode,
setting the
timeout will raise an exception as expected.
\begin{methoddesc}
[socket]
{
setsockopt
}{
level, optname, value
}
Set the value of the given socket option (see the
\UNIX
{}
manual page
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment