MCPcopy Create free account
hub / github.com/geekcomputers/Python / recieve

Function recieve

Python_chatting_application/client.py:11–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9
10
11def recieve():
12 while True:
13 try:
14 msg = s.recv(1024).decode("utf-8")
15 if msg == "NICK":
16 print("Welcome to Chat room :: ", nickname)
17 s.send(bytes(nickname, "utf-8"))
18 else:
19 print(msg)
20 except Exception as error:
21 print(f"An Erro occured {error}")
22 s.close()
23 flag = 1
24 break
25
26
27def Write():

Callers

nothing calls this directly

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected