Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
d69f4255
Commit
d69f4255
authored
May 30, 2011
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gevent.socket: remove bind_and_listen and tcp_listener
parent
d5070af2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
17 deletions
+0
-17
gevent/socket.py
gevent/socket.py
+0
-17
No files found.
gevent/socket.py
View file @
d69f4255
...
...
@@ -579,23 +579,6 @@ else:
__implements__
.
remove
(
'fromfd'
)
def
bind_and_listen
(
descriptor
,
address
=
(
''
,
0
),
backlog
=
50
,
reuse_addr
=
True
):
if
reuse_addr
:
try
:
descriptor
.
setsockopt
(
SOL_SOCKET
,
SO_REUSEADDR
,
descriptor
.
getsockopt
(
SOL_SOCKET
,
SO_REUSEADDR
)
|
1
)
except
error
:
pass
descriptor
.
bind
(
address
)
descriptor
.
listen
(
backlog
)
def
tcp_listener
(
address
,
backlog
=
50
,
reuse_addr
=
True
):
"""A shortcut to create a TCP socket, bind it and put it into listening state."""
sock
=
socket
()
bind_and_listen
(
sock
,
address
,
backlog
=
backlog
,
reuse_addr
=
reuse_addr
)
return
sock
try
:
_GLOBAL_DEFAULT_TIMEOUT
=
__socket__
.
_GLOBAL_DEFAULT_TIMEOUT
except
AttributeError
:
...
...
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