Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rdos-python
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien David
rdos-python
Commits
28530fed
Commit
28530fed
authored
4 years ago
by
Ismail Moumni
Browse files
Options
Downloads
Patches
Plain Diff
removing
parent
8824e5ff
No related branches found
Branches containing commit
No related tags found
1 merge request
!5
Wip adding tests and json functions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client.py
+3
-10
3 additions, 10 deletions
client.py
with
3 additions
and
10 deletions
client.py
+
3
−
10
View file @
28530fed
...
...
@@ -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_P
ort
__
)
def
__init__
(
self
,
port
):
socket
=
server_conn
(
__RDOS_Host__
,
p
ort
)
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
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment