Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
GOUVILLE Tom
projet-rsa-réseau
Commits
0ea2e009
Verified
Commit
0ea2e009
authored
2 years ago
by
GOUVILLE Tom
🤞
Browse files
Options
Download
Email Patches
Plain Diff
documentation
parent
276cfb21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
1 deletion
+64
-1
README.md
README.md
+60
-1
src/clientUDP.c
src/clientUDP.c
+4
-0
No files found.
README.md
View file @
0ea2e009
#
p
rojet
-rsa-
réseau
#
P
rojet
RSA
réseau
## Client serveur TCP
Compilation du serveur TCP :
```
bash
make serveur_tcp
```
Compilation du client TCP :
```
bash
make client_tcp
```
Lancement du serveur :
```
bash
./serveur_tcp
```
Lancement des clients :
```
bash
./client_tcp <server_ip> <server_port>
```
Le serveur écoute sur le port
`2222`
.
Plusieurs clients peuvent se connecter et envoyer des messages au serveur et le serveur partage les messages à tous les clients.
## Client serveur UDP
Compilation du serveur UDP :
```
bash
make serveur_udp
```
Compilation du client UDP :
```
bash
make client_udp
```
Lancement du serveur :
```
bash
./serveur_udp
```
Lancement des clients :
```
bash
./client_udp <server_ip> <server_port>
```
Le serveur écoute sur le port
`2222`
.
Le client envoie la date au serveur qui l'affiche.
This diff is collapsed.
Click to expand it.
src/clientUDP.c
View file @
0ea2e009
...
...
@@ -14,6 +14,10 @@
int
main
(
int
argc
,
char
const
*
argv
[])
{
if
(
argc
<
3
)
{
printf
(
"Usage: ./clientTCP <ip> <port>
\n
"
);
exit
(
1
);
}
// Instantiation of a TCP socket
int
sockfd
;
if
((
sockfd
=
socket
(
PF_INET
,
SOCK_DGRAM
,
0
))
<
0
)
{
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment