Fix the docs

This commit is contained in:
Scott Shawcroft 2022-03-18 14:56:20 -07:00
parent 6f0d62d85e
commit 543940e0a7
No known key found for this signature in database
GPG Key ID: 0DFD512649C052DA
3 changed files with 9 additions and 9 deletions

View File

@ -33,12 +33,12 @@
#include "shared-bindings/mdns/RemoteService.h"
//| class RemoteService:
//| """Encapsulates information about a remote service that was found during a query. This
//| """Encapsulates information about a remote service that was found during a search. This
//| object may only be created by a `mdns.Server`. It has no user-visible constructor."""
//|
//| def __init__(self) -> None:
//| """Cannot be instantiated directly. Use `mdns.Server.query`."""
//| """Cannot be instantiated directly. Use `mdns.Server.find`."""
//| ...
//|

View File

@ -135,7 +135,7 @@ const mp_obj_property_t mdns_server_instance_name_obj = {
//| """Find all locally available remote services with the given service type and protocol.
//|
//| This doesn't allow for direct hostname lookup. To do that, use
//| `socketpool.SocketPool.getaddrinfo()`
//| `socketpool.SocketPool.getaddrinfo()`.
//|
//| :param str service_type: The service type such as "_http"
//| :param str protocol: The service protocol such as "_tcp"

View File

@ -91,13 +91,13 @@ STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_
}
MP_DEFINE_CONST_FUN_OBJ_KW(socketpool_socketpool_socket_obj, 1, socketpool_socketpool_socket);
//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> Tuple[int, int, int, str, Tuple[str, int]]:
//| """Gets the address information for a hostname and port
//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> Tuple[int, int, int, str, Tuple[str, int]]:
//| """Gets the address information for a hostname and port
//|
//| Returns the appropriate family, socket type, socket protocol and
//| address information to call socket.socket() and socket.connect() with,
//| as a tuple."""
//| ...
//| Returns the appropriate family, socket type, socket protocol and
//| address information to call socket.socket() and socket.connect() with,
//| as a tuple."""
//| ...
//|
STATIC mp_obj_t socketpool_socketpool_getaddrinfo(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_host, ARG_port, ARG_family, ARG_type, ARG_proto, ARG_flags };