In this Java Programming project I used gradle insted of maven as I soly wanted to explore the tasks carry out the "workhorses" in Gradle, which is to built on a graph of relationships between tasks.
- gradle
gradle wrapper
\./gradlew build -x test
./gradlew run --args='[PORT_NUMBER] [AT_MOST_ONCE] [PACKET_DROP_RATE]'
\
PORT_NUMBER
: Server port numberAT_MOST_ONCE
: Boolean, true to start server using at-most-once semantics and false to start using at-least-once semanticsPACKET_DROP_RATE
: Probability that a packet will be dropped by the server
cd src/main/java
javac client/Main.java
java client.Main [HOST_NAME] [SERVER_PORT] [CLIENT_PORT] [PACKET_DROP_RATE] [TIMEOUT] [MAX_TRIES]
HOST_NAME
: IP address of serverSERVER_PORT
: Server port numberCLIENT_PORT
: Client port numberPACKET_DROP_RATE
: Probability that a packet will be dropped by the clientTIMEOUT
: Client socket timeout in millisecondsMAX_TRIES
: Maximum number of retries