mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
OnReceivedError callback for clients
This commit is contained in:
parent
646b6256c3
commit
81ea1e0ce7
@ -15,6 +15,8 @@ namespace Mirror.FizzySteam
|
||||
private event Action<byte[], int> OnReceivedData;
|
||||
private event Action OnConnected;
|
||||
private event Action OnDisconnected;
|
||||
// CHANGED
|
||||
private event Action<TransportError, string> OnReceivedError;
|
||||
|
||||
private TimeSpan ConnectionTimeout;
|
||||
|
||||
@ -34,6 +36,8 @@ namespace Mirror.FizzySteam
|
||||
c.OnConnected += () => transport.OnClientConnected.Invoke();
|
||||
c.OnDisconnected += () => transport.OnClientDisconnected.Invoke();
|
||||
c.OnReceivedData += (data, channel) => transport.OnClientDataReceived.Invoke(new ArraySegment<byte>(data), channel);
|
||||
// CHANGED
|
||||
c.OnReceivedError += (error, reason) => transport.OnClientError.Invoke(error, reason);
|
||||
|
||||
|
||||
try
|
||||
|
@ -18,6 +18,8 @@ namespace Mirror.FizzySteam
|
||||
private event Action<byte[], int> OnReceivedData;
|
||||
private event Action OnConnected;
|
||||
private event Action OnDisconnected;
|
||||
// CHANGED
|
||||
private event Action<TransportError, string> OnReceivedError;
|
||||
private Steamworks.Callback<SteamNetConnectionStatusChangedCallback_t> c_onConnectionChange = null;
|
||||
|
||||
private CancellationTokenSource cancelToken;
|
||||
@ -39,6 +41,8 @@ namespace Mirror.FizzySteam
|
||||
c.OnConnected += () => transport.OnClientConnected.Invoke();
|
||||
c.OnDisconnected += () => transport.OnClientDisconnected.Invoke();
|
||||
c.OnReceivedData += (data, ch) => transport.OnClientDataReceived.Invoke(new ArraySegment<byte>(data), ch);
|
||||
// CHANGED
|
||||
c.OnReceivedError += (error, reason) => transport.OnClientError.Invoke(error, reason);
|
||||
|
||||
try
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user