2023-11-01 21:11:11 +00:00
|
|
|
// This file Copyright © Juliusz Chroboczek.
|
2022-01-20 18:27:56 +00:00
|
|
|
// It may be used under the MIT (SPDX: MIT) license.
|
|
|
|
// License text can be found in the licenses/ folder.
|
2011-02-18 00:23:47 +00:00
|
|
|
|
2017-11-14 20:21:28 +00:00
|
|
|
#pragma once
|
|
|
|
|
2011-02-18 00:45:44 +00:00
|
|
|
#ifndef __TRANSMISSION__
|
2017-04-19 12:04:45 +00:00
|
|
|
#error only libtransmission should #include this header.
|
2011-02-18 00:45:44 +00:00
|
|
|
#endif
|
|
|
|
|
2021-12-15 21:25:42 +00:00
|
|
|
#include <cstddef> // size_t
|
|
|
|
|
2023-11-03 17:03:26 +00:00
|
|
|
#ifndef _WIN32
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#else
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
|
|
|
|
2022-02-19 13:45:19 +00:00
|
|
|
struct tr_session;
|
|
|
|
|
2024-03-25 01:48:23 +00:00
|
|
|
void tr_utp_init(tr_session* session);
|
2022-07-08 15:13:22 +00:00
|
|
|
|
2024-03-25 01:48:23 +00:00
|
|
|
bool tr_utp_packet(unsigned char const* buf, size_t buflen, struct sockaddr const* from, socklen_t fromlen, tr_session* ss);
|
2011-02-18 00:33:11 +00:00
|
|
|
|
2024-03-25 01:48:23 +00:00
|
|
|
void tr_utp_issue_deferred_acks(tr_session* ss);
|
|
|
|
|
|
|
|
void tr_utp_close(tr_session* session);
|