Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@

namespace FishNet.Connection
{
public partial class NetworkConnection
/// <summary>
/// Abstraction of a NetworkConnection's broadcasting duties
/// </summary>
public interface INetworkConnectionBroadcaster
{
/// <summary>
/// Sends a broadcast to this connection.
/// </summary>
/// <typeparam name = "T">Type of broadcast to send.</typeparam>
/// <param name = "message">Broadcast data being sent; for example: an instance of your broadcast type.</param>
/// <param name = "requireAuthenticated">True if the client must be authenticated for this broadcast to send.</param>
/// <param name = "channel">Channel to send on.</param>
void Broadcast<T>(T message, bool requireAuthenticated = true, Channel channel = Channel.Reliable) where T : struct, IBroadcast;
}

public partial class NetworkConnection : INetworkConnectionBroadcaster
{
#region Private.
/// <summary>
Expand Down