private void OnDisconnent(Peer peer, Reader message, DisconnectReason reason, Exception exception) { MessageHandler.Run(() => { Debug.Log(peer?.Remote + " disconnected with reason " + reason + " and optional exception " + exception?.Message); OnPeerDisconnect?.Invoke(peer, message, reason, exception); }); }
private void OnConnect(Peer peer) { MessageHandler.Run(() => { Debug.Log(peer.Remote + " connected"); OnPeerConnect?.Invoke(peer); }); }
private void OnException(Peer peer, Exception exception) { MessageHandler.Run(() => { Debug.LogError(peer?.Remote + ": " + exception?.Message); OnPeerException?.Invoke(peer, exception); }); }
private void OnUpdateRTT(Peer peer, ushort rtt) { MessageHandler.Run(() => OnPeerRTT?.Invoke(peer, rtt)); }