aula de thread

This commit is contained in:
Fernando Luiz de Lima
2026-04-17 21:46:48 -03:00
parent 401c336ba6
commit e0ccfdf7d8
5 changed files with 97 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# mmodelo de importacao diferente. nao precisa mais
#usar a palavra socket (modulo) antes do recusos
from socket import*
cliente = socket(AF_INET, SOCK_STREAM)
# abrir conexao
cliente.connect(("10.209.1.45", 3000))
cliente.send("Ola, servidor! aqui é o Fernando".encode())
mensagem = cliente.recv(1024)
print(f"mensagem recebida{mensagem.decode()}")