mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
udp: use action 1 for IPv6 announce responses; refactor protocol code
According to BEP015, action 1 is to be used.
This commit is contained in:
parent
8e7f8425f9
commit
903010dbe1
6 changed files with 99 additions and 213 deletions
|
|
@ -56,7 +56,7 @@ pub fn run_worker_thread(
|
|||
for event in events.iter() {
|
||||
if (event.token() == token) & event.is_readable() {
|
||||
while let Ok(amt) = socket.recv(&mut buffer) {
|
||||
match Response::from_bytes(&buffer[0..amt]) {
|
||||
match Response::from_bytes(&buffer[0..amt], addr.is_ipv4()) {
|
||||
Ok(response) => {
|
||||
match response {
|
||||
Response::AnnounceIpv4(ref r) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue