Commit fd433984 authored by Julien David's avatar Julien David
Browse files

Merge branch 'update_gitlab-ci' into 'master'

Update gitlab ci

See merge request !4
parents 40b89ddb bd1bd7cf
Pipeline #624 passed with stage
in 13 seconds
image: alpine
stages:
- build
- test
job:build:
stage: build
script:
- apk update
- apk add python3
- apk add py-pip
- pip install pytest mysql-connector-python get_docker_secret docker
job:test:unit:
before_script:
- echo "Install Dependancies"
- sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
- apk update
- apk add python3
- apk add py-pip
- pip install pytest mysql-connector-python get_docker_secret docker
- pip install pytest mysql-connector-python get_docker_secret docker flake8
- echo "Start Tests"
script:
- cd tests
- pytest -v
- cd ..
- flake8 --max-line-length=120 softwares/server/*
after_script:
- echo "Tests have been done"
#authors : Julien David & Ismail MOUMNI
# Authors : Julien David & Ismail MOUMNI
import socket
# SERVER PORT
__RDOS_Port__ = 9393
# Creating Socket IP4 TCP
def server_conn(address, PORT):
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as serv:
#BINDING
serv.bind((address,PORT))
# Listening to 1 CLient
# BINDING
serv.bind((address, PORT))
# Listening to 1 CLient
serv.listen()
#accepting the connection from client and getting client IP
# Accepting the connection from client and getting client IP
conn, addr = serv.accept()
with conn:
# Sending
conn.send(bytes("Bonjour !!","utf-8"))
print('Connexion acceptée depuis l IP : ',addr)
# Sending
conn.send(bytes("Bonjour !!", "utf-8"))
print('Connexion acceptée depuis l IP : ', addr)
# Receiving Data from Client
data = conn.recv(1024)
print(data)
serv.close()
Markdown is supported
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