Skip to content

Commit da6b376

Browse files
committed
更改ussl。wrap_socket参数描述为与代码一致
1 parent 1549191 commit da6b376

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/std-librarys/ussl.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module provides access to Transport Layer Security (previously and widely k
66

77
## 功能函数
88

9-
- `ussl.wrap_socket`(sock, server_side=False, keyfile=None, certfile=None, cert_reqs=CERT_NONE, ca_certs=None)
9+
- `ussl.wrap_socket`(sock, server_side=False, key=None, cert=None)
1010

1111
Takes a [`stream`](http://docs.micropython.org/en/latest/reference/glossary.html#term-stream) *sock* (usually usocket.socket instance of `SOCK_STREAM` type), and returns an instance of ssl.SSLSocket, which wraps the underlying stream in an SSL context. Returned object has the usual [`stream`](http://docs.micropython.org/en/latest/reference/glossary.html#term-stream) interface methods like `read()`, `write()`, etc. In MicroPython, the returned object does not expose socket interface and methods like `recv()`, `send()`. In particular, a server-side SSL socket should be created from a normal socket returned from[`accept()`](http://docs.micropython.org/en/latest/library/usocket.html#usocket.socket.accept) on a non-SSL listening server socket. Depending on the underlying module implementation in a particular [`MicroPython port`](http://docs.micropython.org/en/latest/reference/glossary.html#term-micropython-port), some or all keyword arguments above may be not supported.
1212

0 commit comments

Comments
 (0)