diff --git a/.gitignore b/.gitignore index 3a8f17f..eee267a 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,7 @@ .idea/ __pycache__/ log -dncserver.conf +*.aux +*.log +*.toc +*.synctex.gz diff --git a/server/Server.py b/server/Server.py index 835faf8..eaa53f0 100644 --- a/server/Server.py +++ b/server/Server.py @@ -91,7 +91,7 @@ def main(): while True: #Connection client connection, client_address = sock.accept() - usersConnected[connection] = [client_address, None, True] # ip pseudo status + usersConnected[connection] = [client_address, None, True] # (ip,port) pseudo status threading.Thread(target=handle_connection, args=(connection, client_address)).start() except KeyboardInterrupt: # Disable to received more requests on socket @@ -222,6 +222,7 @@ def broadcast_message(connection, message): con.sendall(message.encode()) except Exception as e: log.printL(str(e), Log.lvl.FAIL) + log.printL("Broadcast : {}".format(message), Log.lvl.INFO) ## @@ -233,6 +234,7 @@ def user_list_active(connection): if value[1] is not None and value[2]: l += value[1] + " " connection.sendall(l[:-1].encode()) + log.printL("Send to {} : {}".format(usersConnected[connection][0][0], l[:-1]), Log.lvl.INFO) ## diff --git a/server/doc/manual/DNCServerStartManual.pdf b/server/doc/manual/DNCServerStartManual.pdf new file mode 100644 index 0000000..d79fece Binary files /dev/null and b/server/doc/manual/DNCServerStartManual.pdf differ diff --git a/server/doc/manual/DNCServerStartManual.tex b/server/doc/manual/DNCServerStartManual.tex new file mode 100755 index 0000000..07ab70f --- /dev/null +++ b/server/doc/manual/DNCServerStartManual.tex @@ -0,0 +1,103 @@ +%---------------------------------------------------------------------------------------- +% PACKAGES AND OTHER DOCUMENT CONFIGURATIONS +%---------------------------------------------------------------------------------------- + +\documentclass[12pt]{article} +\usepackage[utf8]{inputenc} +\usepackage[british,UKenglish,USenglish,english,american]{babel} +\usepackage{graphicx} +\usepackage{listings} +\usepackage[T1]{fontenc} +\begin{document} + + +\newcommand{\HRule}{\rule{\linewidth}{0.5mm}} % Defines a new command for the horizontal lines, change thickness here + +\center % Center everything on the page + +%---------------------------------------------------------------------------------------- +% HEADING SECTIONS +%---------------------------------------------------------------------------------------- + +\textsc{\LARGE university Jean-Jaur\`{e}s}\\[1.5cm] % Name of your university/college +\textsc{\large Projet RĂ©seau }\\[0.5cm] % Minor heading such as course title + + +%---------------------------------------------------------------------------------------- +% TITLE SECTION +%---------------------------------------------------------------------------------------- + +\HRule \\[0.4cm] +{ \huge \bfseries DNC SERVER \\ START MANUAL}\\[0.4cm] % Title of your document +\HRule \\[1.5cm] + %---------------------------------------------------------------------------------------- +% LOGO SECTION +%---------------------------------------------------------------------------------------- + +\includegraphics[scale=0.25]{logo.png}\\[1cm] % Include a department/university logo - this will require the graphicx package + +%---------------------------------------------------------------------------------------- + +%---------------------------------------------------------------------------------------- +% AUTHOR SECTION +%---------------------------------------------------------------------------------------- + +\begin{minipage}{0.4\textwidth} +\begin{flushleft} \large +\emph{Authors:}\\ +Quentin \textsc{Rouland}\\ +Renan \textsc{Husson} +\end{flushleft} +\end{minipage} +~ +\begin{minipage}{0.4\textwidth} +\begin{flushright} \large +\emph{To the attention of :} \\ + M. \textsc{Jacoboni } +\end{flushright} +\end{minipage}\\[4cm] + +% If you don't want a supervisor, uncomment the two lines below and remove the section above +%\Large \emph{Author:}\\ +%John \textsc{Smith}\\[3cm] % Your name + +%---------------------------------------------------------------------------------------- +% DATE SECTION +%---------------------------------------------------------------------------------------- + +{\large \today}\\[3cm] % Date, change the \today to a set date if you want to be precise + + + + +\clearpage +\tableofcontents +\clearpage +\begin{flushleft} +\section{Server} + \subsection{Reqirement} + You need to install python 3.4 for launch the DNC server. + + \subsection{Configuration} + Before running the server, it is possible to change the default configuration file through dncServer.conf. In this file you can configure the port use and the log directory by ther server. + + \begin{center} + \includegraphics[scale=0.5]{config.png} + \end{center} + \newpage + \subsection{Start Server} + Just start the server with the following command : + \begin{lstlisting} + python startServer.py + + \end{lstlisting} + \begin{center} + \includegraphics[scale=0.5]{start.png} + \end{center} + + + + + +\end{flushleft} +\end{document} \ No newline at end of file diff --git a/server/doc/manual/config.png b/server/doc/manual/config.png new file mode 100644 index 0000000..170e8da Binary files /dev/null and b/server/doc/manual/config.png differ diff --git a/server/doc/manual/logo.png b/server/doc/manual/logo.png new file mode 100644 index 0000000..d42c54f Binary files /dev/null and b/server/doc/manual/logo.png differ diff --git a/server/doc/manual/start.png b/server/doc/manual/start.png new file mode 100644 index 0000000..d6b2a0f Binary files /dev/null and b/server/doc/manual/start.png differ