2023-11-01 22:11:11 +01:00
|
|
|
// This file Copyright © Juliusz Chroboczek.
|
2022-01-20 12:27:56 -06: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 23:21:28 +03:00
|
|
|
#pragma once
|
|
|
|
|
2011-02-18 00:45:44 +00:00
|
|
|
#ifndef __TRANSMISSION__
|
2017-04-19 15:04:45 +03:00
|
|
|
#error only libtransmission should #include this header.
|
2011-02-18 00:45:44 +00:00
|
|
|
#endif
|
|
|
|
|
2021-12-15 15:25:42 -06:00
|
|
|
#include <cstddef> // size_t
|
|
|
|
|
2023-11-04 01:03:26 +08:00
|
|
|
#ifndef _WIN32
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#else
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
#endif
|
|
|
|
|
2022-02-19 07:45:19 -06:00
|
|
|
struct tr_session;
|
|
|
|
|
2024-03-25 09:48:23 +08:00
|
|
|
void tr_utp_init(tr_session* session);
|
2022-07-08 10:13:22 -05:00
|
|
|
|
2024-03-25 09:48:23 +08: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 09:48:23 +08:00
|
|
|
void tr_utp_issue_deferred_acks(tr_session* ss);
|
|
|
|
|
|
|
|
void tr_utp_close(tr_session* session);
|