mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-18 11:19:22 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
23 lines
723 B
C#
23 lines
723 B
C#
namespace Sandbox.Network;
|
|
|
|
/// <summary>
|
|
/// An empty connection that can be used for testing and optimizing processing.
|
|
/// Messages can not actually be sent to it, and it won't receive any either. Other clients
|
|
/// will be unaware of it.
|
|
/// </summary>
|
|
internal class EmptyConnection : Connection
|
|
{
|
|
public override string Address => "empty";
|
|
public override string Name => "empty";
|
|
public override bool IsHost => false;
|
|
|
|
internal override void InternalClose( int closeCode, string closeReason ) { }
|
|
internal override void InternalRecv( NetworkSystem.MessageHandler handler ) { }
|
|
internal override void InternalSend( ByteStream stream, NetFlags flags ) { }
|
|
|
|
public EmptyConnection( Guid id )
|
|
{
|
|
Id = id;
|
|
}
|
|
}
|