예제 #1
0
 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);
     });
 }
예제 #2
0
 private void OnConnect(Peer peer)
 {
     MessageHandler.Run(() => {
         Debug.Log(peer.Remote + " connected");
         OnPeerConnect?.Invoke(peer);
     });
 }
예제 #3
0
 private void OnException(Peer peer, Exception exception)
 {
     MessageHandler.Run(() => {
         Debug.LogError(peer?.Remote + ": " + exception?.Message);
         OnPeerException?.Invoke(peer, exception);
     });
 }
예제 #4
0
 private void OnUpdateRTT(Peer peer, ushort rtt)
 {
     MessageHandler.Run(() => OnPeerRTT?.Invoke(peer, rtt));
 }