Some ssl fixes (#919)

Fix return of wrap_socket.
Add read, write, pending to SSLSocket
Fix argument to socket.setdefaulttimeout
This commit is contained in:
David Euresti
2017-02-06 17:23:22 -08:00
committed by Guido van Rossum
parent 06074e1e02
commit 6eca1a04da
5 changed files with 11 additions and 6 deletions

View File

@@ -148,6 +148,10 @@ class SSLSocket(socket.socket):
def selected_npn_protocol(self) -> Optional[str]: ...
def unwrap(self) -> socket.socket: ...
def version(self) -> Optional[str]: ...
def read(self, len: int = ...,
buffer: Optional[bytearray] = ...) -> str: ...
def write(self, buf: str) -> int: ...
def pending(self) -> int: ...
class SSLContext:
@@ -178,7 +182,7 @@ class SSLContext:
def wrap_socket(self, sock: socket.socket, server_side: bool = ...,
do_handshake_on_connect: bool = ...,
suppress_ragged_eofs: bool = ...,
server_hostname: Optional[str] = ...) -> 'SSLContext': ...
server_hostname: Optional[str] = ...) -> SSLSocket: ...
def session_stats(self) -> Dict[str, int]: ...