transmission/libtransmission/tr-utp.h
Yat Ho 3e958cfbaf
feat: µTP delayed ack (#6586)
* chore: rename tr utp functions to snake_case

* refactor: make udp sockets non-blocking

* feat: rudimentary uTP delayed ACK

* chore: housekeeping

* chore: correct comment about µTP packet format
2024-03-24 20:48:23 -05:00

28 lines
639 B
C

// This file Copyright © Juliusz Chroboczek.
// It may be used under the MIT (SPDX: MIT) license.
// License text can be found in the licenses/ folder.
#pragma once
#ifndef __TRANSMISSION__
#error only libtransmission should #include this header.
#endif
#include <cstddef> // size_t
#ifndef _WIN32
#include <sys/socket.h>
#else
#include <ws2tcpip.h>
#endif
struct tr_session;
void tr_utp_init(tr_session* session);
bool tr_utp_packet(unsigned char const* buf, size_t buflen, struct sockaddr const* from, socklen_t fromlen, tr_session* ss);
void tr_utp_issue_deferred_acks(tr_session* ss);
void tr_utp_close(tr_session* session);