-
Notifications
You must be signed in to change notification settings - Fork 53
UDP Tracker client: Print unrecognized responses #671
Copy link
Copy link
Closed
Labels
- Admin -Enjoyable to Install and Setup our SoftwareEnjoyable to Install and Setup our Software- Developer -Torrust Improvement ExperienceTorrust Improvement ExperienceCode Cleanup / RefactoringTidying and Making NeatTidying and Making NeatEasyGood for NewcomersGood for NewcomersTestingChecking TorrustChecking Torrustgood first issueGood for newcomersGood for newcomers
Milestone
Metadata
Metadata
Assignees
Labels
- Admin -Enjoyable to Install and Setup our SoftwareEnjoyable to Install and Setup our Software- Developer -Torrust Improvement ExperienceTorrust Improvement ExperienceCode Cleanup / RefactoringTidying and Making NeatTidying and Making NeatEasyGood for NewcomersGood for NewcomersTestingChecking TorrustChecking Torrustgood first issueGood for newcomersGood for newcomers
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
StatusShow more project fields
Done
Parent issue: #669
When you run the UDP tracker client:
cargo run --bin udp_tracker_client announce 127.0.0.1:6969 9c38422213e30bff212b30c360d26f9a02136422You could receive a response that can't be parsed into an aquatic UDP response. In this case, we should print the response.
This implies changing the
UdtpTrackerClientto return an error with the received packet.As you can see on this line:
The client would panic if it received a response that could be deserialized into a valid aquatic response.
We have to change the signature of the
receivefunction to return aResult<Response, Error>. The error can contain the data received.You can get a list of UDP trackers from https://newtrackon.com/. The client should print all the responses from all those trackers.