Created
December 20, 2020 22:27
-
-
Save hierophect/b6bcdca453166038307b40d5647d9352 to your computer and use it in GitHub Desktop.
Client on Host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import socket | |
HOST = '192.168.10.115' # ESP32S2 IP ADDRESS | |
PORT = 80 # The port used by the server | |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: | |
s.connect((HOST, PORT)) | |
s.sendall(b'Hello, world') | |
data = s.recv(1024) | |
print('Received', repr(data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment