Commit ef733606 authored by Mestari Yousra's avatar Mestari Yousra
Browse files

code frappe client

parent 463f6d49
import zmq
context = zmq.Context()
# Socket to talk to server
socket = context.socket(zmq.DEALER)
socket.connect("tcp://147.250.9.87:5555")
def frappe_client(J):
empty,reponse=socket.recv_multipart()
print(reponse.decode())
case=input()
socket.send_multipart([b'',case.encode()])
empty,reponse1=socket.recv_multipart()
empty,reponse=socket.recv_multipart()
print(reponse1.decode())
reponse=reponse.decode()
print(reponse)
while reponse=="Quelle case frapper?":
case=input()
socket.send_multipart([b'',case.encode()])
empty,reponse1=socket.recv_multipart()
print(reponse1.decode())
empty,reponse=socket.recv_multipart()
reponse=reponse.decode()
print(reponse)
empty,reponse=socket.recv_multipart()
print(reponse.decode())
return
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment