Skip to content
Snippets Groups Projects
Commit 28530fed authored by Ismail Moumni's avatar Ismail Moumni
Browse files

removing

parent 8824e5ff
No related branches found
No related tags found
1 merge request!5Wip adding tests and json functions
......@@ -3,20 +3,19 @@
import socket
import json
__RDOS_Port__ = 9393
__RDOS_Host__ = '127.0.0.1'
# List to save REQUEST Parameters send FROM SERVER for query Match
__RDOS_Req__ = {"parameters": "request"}
__RDOS_Gen__ = {}
class CLIENT():
class RdosClient():
# Function client_init connects to server and sends JSON Parameters needed
# Function input Host : Server IP - Port : Server Port
# Function output returns JSON from server side contanings parameters
def __init__(self):
socket = server_conn(__RDOS_Host__, __RDOS_Port__)
def __init__(self, port):
socket = server_conn(__RDOS_Host__, port)
print("Connexion to socket : ")
data = json.dumps((__RDOS_Req__))
send_st(socket, data)
......@@ -57,12 +56,6 @@ def match_dict(biblio: dict, gen: dict):
raise TypeError("Dictionnaire Vide!!")
def match_json(biblio: dict, gen: dict):
if(match_dict(biblio, gen) == []):
return True
return False
# Function send_st sends to socket data bytes
# Function input socket and data
def send_st(s, data):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment