diff --git a/Assets/Scripts/Net/CanvasInput.cs b/Assets/Scripts/Net/CanvasInput.cs index 3d506d8..cbc67bc 100644 --- a/Assets/Scripts/Net/CanvasInput.cs +++ b/Assets/Scripts/Net/CanvasInput.cs @@ -54,6 +54,9 @@ namespace NeonTea.Quakeball.Net { Debug.Log(text); } + public void Err(string text) { + Debug.Log(text); + } } } \ No newline at end of file diff --git a/Assets/Scripts/TeaNet/Peers/ListenerThread.cs b/Assets/Scripts/TeaNet/Peers/ListenerThread.cs index e0ba64f..acd8831 100644 --- a/Assets/Scripts/TeaNet/Peers/ListenerThread.cs +++ b/Assets/Scripts/TeaNet/Peers/ListenerThread.cs @@ -53,10 +53,10 @@ namespace NeonTea.Quakeball.TeaNet.Peers { if (Array.Exists(CONN_LOST_CODES, x => x == e.ErrorCode)) { if (LastSentConnection != null) { LastSentConnection.Status = ConnectionStatus.Lost; - Peer.MessageListener.Message($"Connection lost to {LastSentConnection.Endpoint}: {e.ToString()}"); + Peer.MessageListener.Err($"Connection lost to {LastSentConnection.Endpoint}: {e.ToString()}"); } } else { - Peer.MessageListener.Message($"Listener error: {e.ToString()}"); + Peer.MessageListener.Err($"Listener error: {e.ToString()}"); } } if (Buffer.ReadFingerprint(Peer.Fingerprint)) { diff --git a/Assets/Scripts/TeaNet/Peers/Peer.cs b/Assets/Scripts/TeaNet/Peers/Peer.cs index 7ff88aa..c48dc64 100644 --- a/Assets/Scripts/TeaNet/Peers/Peer.cs +++ b/Assets/Scripts/TeaNet/Peers/Peer.cs @@ -94,9 +94,8 @@ namespace NeonTea.Quakeball.TeaNet.Peers { return null; } - public void Message(string msg) { - - } + public void Message(string msg) { } + public void Err(string msg) { } public IPAddress FindAddress(string host) { IPAddress addr; @@ -111,5 +110,6 @@ namespace NeonTea.Quakeball.TeaNet.Peers { public interface PeerMessageListener { void Message(string msg); + void Err(string msg); } }