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
13aa0907
Commit
13aa0907
authored
Sep 15, 2010
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ssl: fix sendto/recvfrom/recfrom_into to pass the arguments as is to underlying socket object
parent
94276e4f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
gevent/ssl.py
gevent/ssl.py
+6
-6
No files found.
gevent/ssl.py
View file @
13aa0907
...
@@ -208,12 +208,12 @@ class SSLSocket(socket):
...
@@ -208,12 +208,12 @@ class SSLSocket(socket):
return
socket
.
send
(
self
,
data
,
flags
,
timeout
)
return
socket
.
send
(
self
,
data
,
flags
,
timeout
)
# is it possible for sendall() to send some data without encryption if another end shut down SSL?
# is it possible for sendall() to send some data without encryption if another end shut down SSL?
def
sendto
(
self
,
data
,
addr
,
flags
=
0
):
def
sendto
(
self
,
*
args
):
if
self
.
_sslobj
:
if
self
.
_sslobj
:
raise
ValueError
(
"sendto not allowed on instances of %s"
%
raise
ValueError
(
"sendto not allowed on instances of %s"
%
self
.
__class__
)
self
.
__class__
)
else
:
else
:
return
socket
.
sendto
(
self
,
data
,
addr
,
fla
gs
)
return
socket
.
sendto
(
self
,
*
ar
gs
)
def
recv
(
self
,
buflen
=
1024
,
flags
=
0
):
def
recv
(
self
,
buflen
=
1024
,
flags
=
0
):
if
self
.
_sslobj
:
if
self
.
_sslobj
:
...
@@ -274,19 +274,19 @@ class SSLSocket(socket):
...
@@ -274,19 +274,19 @@ class SSLSocket(socket):
else
:
else
:
return
socket
.
recv_into
(
self
,
buffer
,
nbytes
,
flags
)
return
socket
.
recv_into
(
self
,
buffer
,
nbytes
,
flags
)
def
recvfrom
(
self
,
addr
,
buflen
=
1024
,
flags
=
0
):
def
recvfrom
(
self
,
*
args
):
if
self
.
_sslobj
:
if
self
.
_sslobj
:
raise
ValueError
(
"recvfrom not allowed on instances of %s"
%
raise
ValueError
(
"recvfrom not allowed on instances of %s"
%
self
.
__class__
)
self
.
__class__
)
else
:
else
:
return
socket
.
recvfrom
(
self
,
addr
,
buflen
,
fla
gs
)
return
socket
.
recvfrom
(
self
,
*
ar
gs
)
def
recvfrom_into
(
self
,
buffer
,
nbytes
=
None
,
flags
=
0
):
def
recvfrom_into
(
self
,
*
args
):
if
self
.
_sslobj
:
if
self
.
_sslobj
:
raise
ValueError
(
"recvfrom_into not allowed on instances of %s"
%
raise
ValueError
(
"recvfrom_into not allowed on instances of %s"
%
self
.
__class__
)
self
.
__class__
)
else
:
else
:
return
socket
.
recvfrom_into
(
self
,
buffer
,
nbytes
,
fla
gs
)
return
socket
.
recvfrom_into
(
self
,
*
ar
gs
)
def
pending
(
self
):
def
pending
(
self
):
if
self
.
_sslobj
:
if
self
.
_sslobj
:
...
...
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