initial commit

This commit is contained in:
i2p
2026-08-27 11:22:54 -06:00
commit 3d81b11e14
2281 changed files with 54227 additions and 0 deletions
@@ -0,0 +1,39 @@
using System;
using System.Net;
namespace Crysome.Common.Network.Transport;
public interface ITransportSession : IDisposable, IAsyncDisposable
{
bool IsAlive { get; }
IPEndPoint RemoteEndPoint { get; }
IPEndPoint LocalEndPoint { get; }
double RttMs { get; }
double LossRate { get; }
long BytesSent { get; }
long BytesRecv { get; }
event Action<byte[]> ReliableReceived;
event Action<byte, byte[]> UnreliableFrameReceived;
event Action<double> CongestionChanged;
event Action Disconnected;
void SendReliable(ReadOnlySpan<byte> payload);
void SendReliableBulk(ReadOnlySpan<byte> payload);
void SendUnreliableScreen(byte packetTypeId, ReadOnlySpan<byte> payload);
void SendPacketUnreliable(ReadOnlySpan<byte> payload);
void SendFin();
}