Без опису
Знайти файл
2024-03-10 09:44:16 +01:00
LACAU-Clement-Pseudos_codes.pdf (version 4): multiple connexion and correct infos display 2024-03-07 11:04:17 +01:00
README.md Fixes on README and on -p display for v1 and v2 2024-03-10 09:44:16 +01:00
sujet-TP-AIPS-3MIC.pdf First files upload 2024-02-29 18:44:49 +01:00
TP-AIPS-2024-ALNET-Paul-preparation-v1-v4.md feat(prepa): add pseudo-code for v1-v4 2024-03-01 15:36:37 +01:00
tsock_v0.c fix(v0): incorrect main return type 2024-03-07 09:56:41 +01:00
tsock_v1.c Fixes on README and on -p display for v1 and v2 2024-03-10 09:44:16 +01:00
tsock_v2.c Fixes on README and on -p display for v1 and v2 2024-03-10 09:44:16 +01:00
tsock_v3.c (tsock_v3) 'infinite' default display of receiving packets fix 2024-03-09 00:30:25 +01:00
tsock_v4.c (tsock_v4) lots of minor modifications 2024-03-09 00:16:55 +01:00
tsock_v4_before_inversion.c Version 4 functional 2024-03-07 12:12:34 +01:00

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.