first commit

This commit is contained in:
2025-12-13 14:28:35 +01:00
commit 679c3c9a52
113 changed files with 715750 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
// This file is provided under The MIT License as part of RiptideNetworking.
// Copyright (c) Tom Weiland
// For additional information please see the included LICENSE.md file or view it on GitHub:
// https://github.com/RiptideNetworking/Riptide/blob/main/LICENSE.md
using System;
namespace Riptide.Transports
{
/// <summary>Defines methods, properties, and events which every transport's client must implement.</summary>
public interface IClient : IPeer
{
/// <summary>Invoked when a connection is established at the transport level.</summary>
event EventHandler Connected;
/// <summary>Invoked when a connection attempt fails at the transport level.</summary>
event EventHandler ConnectionFailed;
/// <summary>Starts the transport and attempts to connect to the given host address.</summary>
/// <param name="hostAddress">The host address to connect to.</param>
/// <param name="connection">The pending connection. <see langword="null"/> if an issue occurred.</param>
/// <param name="connectError">The error message associated with the issue that occurred, if any.</param>
/// <returns><see langword="true"/> if a connection attempt will be made. <see langword="false"/> if an issue occurred (such as <paramref name="hostAddress"/> being in an invalid format) and a connection attempt will <i>not</i> be made.</returns>
bool Connect(string hostAddress, out Connection connection, out string connectError);
/// <summary>Closes the connection to the server.</summary>
void Disconnect();
}
}