diff --git a/Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs b/Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs index 1de07448..b1ac827e 100644 --- a/Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs +++ b/Assets/FishNet/Runtime/Connection/NetworkConnection.Buffer.cs @@ -10,7 +10,22 @@ namespace FishNet.Connection { - public partial class NetworkConnection + /// + /// Abstraction of a NetworkConnection's broadcasting duties + /// + public interface INetworkConnectionBroadcaster + { + /// + /// Sends a broadcast to this connection. + /// + /// Type of broadcast to send. + /// Broadcast data being sent; for example: an instance of your broadcast type. + /// True if the client must be authenticated for this broadcast to send. + /// Channel to send on. + void Broadcast(T message, bool requireAuthenticated = true, Channel channel = Channel.Reliable) where T : struct, IBroadcast; + } + + public partial class NetworkConnection : INetworkConnectionBroadcaster { #region Private. ///