Без опису
LACAU-Clement-Pseudos_codes.pdf | ||
README.md | ||
sujet-TP-AIPS-3MIC.pdf | ||
TP-AIPS-2024-ALNET-Paul-preparation-v1-v4.md | ||
tsock_v0.c | ||
tsock_v1.c | ||
tsock_v2.c | ||
tsock_v3.c | ||
tsock_v4.c | ||
tsock_v4_before_inversion.c |
TP_AIPS
- Groupe : 3IR C 2023-2024
- Étudiants :
- LACAU Clement
- ALNET Paul
Building
Compile version X
:
gcc -Wall -Wpedantic tsock_vX.c -o t_sockvX
Or compile all versions:
gcc -Wall -Wpedantic tsock_v1.c -o t_sockv1
gcc -Wall -Wpedantic tsock_v2.c -o t_sockv2
gcc -Wall -Wpedantic tsock_v3.c -o t_sockv3
gcc -Wall -Wpedantic tsock_v4.c -o t_sockv4
Generate zip archive (replace TP1
with relevant indication) :
zip LACAU-ALNET-TP1.zip tsock_v*.c README.md
Running
usage: ./t_sockv1 <-u> [-ps] [host] <port>
parameters: host With -s, address of the host to connect to. Required with -s.
port Port to connect or bind to. Required.
options: -p Runs a TCP/UDP sink. Incompatible with -s.
-s Runs a TCP/UDP faucet. Incompatible with -p.
-u Use UDP instead of TCP. Required.
usage: ./t_sockv2 [-psu] [host] <port>
parameters: host With -s, address of the host to connect to. Required with -s.
port Port to connect or bind to. Required.
options: -p Runs a TCP/UDP sink. Incompatible with -s.
-s Runs a TCP/UDP faucet. Incompatible with -p.
-u Use UDP instead of TCP.
usage: ./t_sockv3 [-psu] [-n nb_messages] [-l mess_length] [host] <port>
parameters: host With -s, address of the host to connect to. Required with -s.
port Port to connect or bind to. Required.
options: -l mess_length Size of the messages to send. Min 5. Max 1400. Default 30.
-n nb_messages Number of messages to send. Min 1. Default 10. Ignored with -p.
-p Runs a TCP/UDP sink. Incompatible with -s.
-s Runs a TCP/UDP faucet. Incompatible with -p.
-u Use UDP instead of TCP.
Example usage of v3 :
./t_sockv3 -p -l 15 4000 # receiver
./t_sockv3 -s -l 15 localhost 4000 # sender
Example usage of v4 :
./t_sockv4 -S -r -n 20 -l 15 4000 # server receiver
./t_sockv4 -C -e -n 20 -l 15 localhost 4000 # client sender
./t_sockv4 -S -e -n 20 -l 15 4000 # server sender
./t_sockv4 -C -r -n 20 -l 15 localhost 4000 # client receiver
Roadmap
- tsock-v1
- tsock-v2
- tsock-v3
- tsock-v4
- server can handle multiple requests simultaneously
- server doesn't stop after the connection ends
- both client and server can assume sender/receiver roles
Every version is fully functional.