SHA256
POO:WiFi-STA|Basic:WebSocket
This commit is contained in:
1 parent
082995d264
commit
20c3ecd30e
3 files changed
+95
-83
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import time
|
||||
|
||||
from websocket import create_connection
|
||||
|
||||
ws = create_connection("ws://192.168.0.220:81")
|
||||
|
||||
print("Conectado")
|
||||
|
||||
try:
|
||||
while True:
|
||||
data = ws.recv()
|
||||
|
||||
if isinstance(data, bytes):
|
||||
print(f"BIN: {list(data)}")
|
||||
|
||||
else:
|
||||
print(f"TXT: {data}")
|
||||
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("Cerrando conexión")
|
||||
|
||||
ws.close()
|
||||
Reference in new issue
Block a user