Commit ef7336062b89edad4b1d882f6808f3a85ffea8f7

Authored by Mestari Yousra
1 parent 463f6d49

code frappe client

Showing 1 changed file with 30 additions and 0 deletions   Show diff stats
frappe_client.py 0 → 100644
... ... @@ -0,0 +1,30 @@
  1 +import zmq
  2 +
  3 +context = zmq.Context()
  4 +
  5 +# Socket to talk to server
  6 +
  7 +socket = context.socket(zmq.DEALER)
  8 +socket.connect("tcp://147.250.9.87:5555")
  9 +
  10 +def frappe_client(J):
  11 + empty,reponse=socket.recv_multipart()
  12 + print(reponse.decode())
  13 + case=input()
  14 + socket.send_multipart([b'',case.encode()])
  15 + empty,reponse1=socket.recv_multipart()
  16 + empty,reponse=socket.recv_multipart()
  17 + print(reponse1.decode())
  18 + reponse=reponse.decode()
  19 + print(reponse)
  20 + while reponse=="Quelle case frapper?":
  21 + case=input()
  22 + socket.send_multipart([b'',case.encode()])
  23 + empty,reponse1=socket.recv_multipart()
  24 + print(reponse1.decode())
  25 + empty,reponse=socket.recv_multipart()
  26 + reponse=reponse.decode()
  27 + print(reponse)
  28 + empty,reponse=socket.recv_multipart()
  29 + print(reponse.decode())
  30 + return
... ...