Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1. Write a drop-in replacement for DatagramSocket #2

Open
1 of 2 tasks
IMarnild opened this issue Sep 4, 2018 · 0 comments
Open
1 of 2 tasks

1. Write a drop-in replacement for DatagramSocket #2

IMarnild opened this issue Sep 4, 2018 · 0 comments

Comments

@IMarnild
Copy link

IMarnild commented Sep 4, 2018

Write a drop-in replacement for DatagramSocket which randomly either discards, duplicates, reorders or simply sends datagrams. Inherit from DatagramSocket.

When sending the datagrams "Hello" and "Goodbye" the following datagrams could be send.

  • Discard: "Goodbye"

  • Duplicate: "Hello", "Hello", "Goodbye"

  • Reorder: "Goodbye", "Hello"

  • Send: "Hello", "Goodbye"

  • Test your implementation with a (modified) UDP-client.

(Hint, useful Java libraries: java.util.Random, java.net.DatagramSocket)

  • Submit your solution as a single Java-file QuestionableDatagramSocket.java.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant