示例#1
0
 protected virtual void OnServerP2PSessionConnectFail(P2PSessionConnectFailEventArgs e)
 {
     if (this.ServerP2PSessionConnectFail != null)
     {
         this.ServerP2PSessionConnectFail(this, e);
     }
 }
示例#2
0
 private void ISteamClientService_ClientP2PSessionConnectFail(object sender, P2PSessionConnectFailEventArgs e)
 {
     Steamworks.SteamID steamID = new Steamworks.SteamID(e.Message.m_steamIDRemote);
     Diagnostics.LogWarning("[Session] P2PSessionConnectFail with {0}.", new object[]
     {
         steamID
     });
     if (Session.IgnoreP2PSessionConnectFail != steamID)
     {
         if (!this.IsHosting && steamID == this.SteamIDServer)
         {
             this.OnError(Session.ErrorLevel.Error, "%SessionP2PSessionConnectFail", (int)e.Message.m_eP2PSessionError);
             this.Close();
         }
     }
     else
     {
         Diagnostics.LogWarning("[Session] P2PSessionConnectFail ignored for {0}.", new object[]
         {
             Session.IgnoreP2PSessionConnectFail
         });
         Session.IgnoreP2PSessionConnectFail = null;
     }
 }