Closed e28eta closed 1 year ago
@e28eta what would you think about putting compatible client code in the PR, if not in some comments in the example code?
@e28eta what would you think about putting compatible client code in the PR, if not in some comments in the example code?
I added your client, and a comment in that client with a nc
version.
Also suggest changing line 21 init to remove dhcp=False since there's no static IP address set up with eth.ipconfig (IP address will be 0.0.0.0 without DHCP or static IP).
I finally got a setup to test myself, and it looks like the server.bind((server_ip, server_port))
call is sufficient to set the local IP (at least for that socket) to the provided server_ip
constant.
Tested successfully (with DHCP change)
I don't have it setup to have a DHCP server running. However, I was able to test the code as it currently exists in this PR on:
Adafruit CircuitPython 7.3.3 on 2022-08-29; Adafruit Feather RP2040 with rp2040
Board ID:adafruit_feather_rp2040
and the Adafruit Ethernet FeatherWing
@anecdata looks like the build is failing because I don't have licensing info in the (newly added) client you wrote. How would you like it licensed?
@anecdata looks like the build is failing because I don't have licensing info in the (newly added) client you wrote. How would you like it licensed?
Can you grab some Adafruit boilerplate? It doesn't matter to me, it's a simple thing I'm sure I pieced together from various examples.
While watching @FoamyGuy stream, I noticed the server code he was using only allowed a single client connection.
This moves the
accept()
call into thewhile True
loop, leaving the server accepting connections as long as theserver
socket is valid.My understanding of the existing example code:
while True
looprecv
up to 1024 bytesconn
in exitconn
socket, receiving nothing and printing nothing (this is undesirable)After this PR, I expect the example code to:
while True
looprecv
up to 1024 bytes