Merge pull request #6855 from tekktrik/doc/socketpool-init

Document socketpool.SocketPool.__init__()
This commit is contained in:
Dan Halbert 2022-09-01 22:27:29 -04:00 committed by GitHub
commit d3626f1321
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 3 deletions

View File

@ -38,11 +38,20 @@
//| class SocketPool:
//| """A pool of socket resources available for the given radio. Only one
//| SocketPool can be created for each radio.
//| SocketPool can be created for each radio.
//|
//| SocketPool should be used in place of CPython's socket which provides
//| a pool of sockets provided by the underlying OS."""
//| SocketPool should be used in place of CPython's socket which provides
//| a pool of sockets provided by the underlying OS.
//| """
//|
//| def __init__(self, radio: wifi.Radio) -> None:
//| """Create a new SocketPool object for the provided radio
//|
//| :param wifi.Radio radio: The (connected) network hardware to associate
//| with this SocketPool; currently, this will always be the object
//| returned by :py:attr:`wifi.radio`
//| """
//| ...
STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {
mp_arg_check_num(n_args, n_kw, 1, 1, false);