Skip to content

Commit

Permalink
Remove non-CPython socket methods; remove wsgi server
Browse files Browse the repository at this point in the history
  • Loading branch information
dhalbert committed May 28, 2022
1 parent 5b5c5c6 commit 43d6243
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion adafruit_esp32spi/adafruit_esp32spi_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,15 @@ def send(self, data): # pylint: disable=no-self-use
_the_interface.socket_write(self._socknum, data, conn_mode=conntype)
gc.collect()

def recv(self, bufsize: int):
def recv(self, bufsize: int) -> bytes:
"""Reads some bytes from the connected remote address. Will only return
an empty string after the configured timeout.
:param int bufsize: maximum number of bytes to receive
"""
buf = bytearray(bufsize)
self.recv_into(buf, bufsize)
return bytes(buf)

def recv_into(self, buffer, nbytes: int = 0):
"""Read bytes from the connected remote address into a given buffer.
Expand Down
3 changes: 0 additions & 3 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
.. automodule:: adafruit_esp32spi.adafruit_esp32spi_wifimanager
:members:

.. automodule:: adafruit_esp32spi.adafruit_esp32spi_wsgiserver
:members:

.. automodule:: adafruit_esp32spi.digitalio
:members:

Expand Down

0 comments on commit 43d6243

Please sign in to comment.