mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-19 11:49:44 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
33 lines
930 B
C#
33 lines
930 B
C#
namespace Sandbox;
|
|
|
|
/// <summary>
|
|
/// An interface for specifying how a custom type can be serialized and deserialized
|
|
/// over the network with support for only sending changes.
|
|
/// </summary>
|
|
internal interface INetworkSerializer
|
|
{
|
|
/// <summary>
|
|
/// Write any changes to the <see cref="ByteStream"/>. This is only applicable if
|
|
/// the type that implements this also implements <see cref="INetworkReliable"/>.
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
void WriteChanged( ref ByteStream data );
|
|
|
|
/// <summary>
|
|
/// Write all data to the <see cref="ByteStream"/>.
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
void WriteAll( ref ByteStream data );
|
|
|
|
/// <summary>
|
|
/// Read data from a <see cref="ByteStream"/>.
|
|
/// </summary>
|
|
/// <param name="data"></param>
|
|
void Read( ref ByteStream data );
|
|
|
|
/// <summary>
|
|
/// Whether we currently have changes (are we dirty?)
|
|
/// </summary>
|
|
bool HasChanges { get; }
|
|
}
|