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
a47b75b0
Commit
a47b75b0
authored
Jan 04, 2008
by
Christian Heimes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
socket.ioctl is only available on Windows
parent
aee643b0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
Lib/socket.py
Lib/socket.py
+4
-1
Lib/test/test_socket.py
Lib/test/test_socket.py
+10
-0
No files found.
Lib/socket.py
View file @
a47b75b0
...
...
@@ -141,7 +141,10 @@ _socketmethods = (
'bind'
,
'connect'
,
'connect_ex'
,
'fileno'
,
'listen'
,
'getpeername'
,
'getsockname'
,
'getsockopt'
,
'setsockopt'
,
'sendall'
,
'setblocking'
,
'settimeout'
,
'gettimeout'
,
'shutdown'
,
'ioctl'
)
'settimeout'
,
'gettimeout'
,
'shutdown'
)
if
os
.
name
==
"nt"
:
_socketmethods
=
_socketmethods
+
(
'ioctl'
,)
if
sys
.
platform
==
"riscos"
:
_socketmethods
=
_socketmethods
+
(
'sleeptaskw'
,)
...
...
Lib/test/test_socket.py
View file @
a47b75b0
...
...
@@ -9,6 +9,7 @@ import time
import
thread
,
threading
import
Queue
import
sys
import
os
import
array
from
weakref
import
proxy
import
signal
...
...
@@ -500,6 +501,15 @@ class GeneralModuleTests(unittest.TestCase):
self
.
assertEqual
(
sock
.
proto
,
0
)
sock
.
close
()
def
test_sock_ioctl
(
self
):
if
os
.
name
!=
"nt"
:
return
self
.
assert_
(
hasattr
(
socket
.
socket
,
'ioctl'
))
self
.
assert_
(
hasattr
(
socket
,
'SIO_RCVALL'
))
self
.
assert_
(
hasattr
(
socket
,
'RCVALL_ON'
))
self
.
assert_
(
hasattr
(
socket
,
'RCVALL_OFF'
))
class
BasicTCPTest
(
SocketConnectedTest
):
def
__init__
(
self
,
methodName
=
'runTest'
):
...
...
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