Primer commit

This commit is contained in:
2025-05-05 02:21:55 +02:00
commit 7b6f525809
62 changed files with 78661 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
import asyncio
async def enviar_mensajes():
reader, writer = await asyncio.open_connection('127.0.0.1', 8888)
while True:
mensaje = input("Escribe un mensaje (o 'salir'): ")
if mensaje.lower() == 'salir':
break
writer.write(mensaje.encode())
await writer.drain()
data = await reader.read(100)
print(f"💬 Respuesta del servidor: {data.decode()}")
print("🔚 Cerrando conexión")
writer.close()
await writer.wait_closed()
asyncio.run(enviar_mensajes())