mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-08-01 08:18:20 -04:00
* Servers get the player's name through handshake again, clients resolve using Steam * Connection.Name formalized and no longer a mismatch of virtual overrides * Connection.DisplayName now filters text using Steam settings * Local instances set random name outside of networking code * Used Connection.Name instead of Connection.DisplayName where it makes sense throughout the engine * Join / leave messages are pushed to chat at a platform level * Removed some overly verbose connection logs
22 lines
676 B
C#
22 lines
676 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 bool IsHost => false;
|
|
|
|
internal override void InternalClose( int closeCode, string closeReason ) { }
|
|
internal override void InternalRecv( NetworkSystem.MessageHandler handler ) { }
|
|
internal override void InternalSend( byte[] data, NetFlags flags ) { }
|
|
|
|
public EmptyConnection( Guid id )
|
|
{
|
|
Id = id;
|
|
}
|
|
}
|