Ejemplo n.º 1
0
 private bool IsPacketAvailable(out uint size)
 {
     lock (this.RailLock)
     {
         IRailNetwork irailNetwork = rail_api.RailFactory().RailNetworkHelper();
         RailID       railId1      = new RailID();
         ((RailComparableID)railId1).id_ = ((RailComparableID)this.GetLocalPeer()).id_;
         RailID   railId2 = railId1;
         ref uint local   = ref size;
         return(irailNetwork.IsDataReady(railId2, ref local));
     }
Ejemplo n.º 2
0
        private bool CloseNetWorkSession(RailID remote_peer)
        {
            bool         flag         = false;
            IRailNetwork irailNetwork = rail_api.RailFactory().RailNetworkHelper();

            if (irailNetwork != null)
            {
                flag = irailNetwork.CloseSession(this._serverID, remote_peer) == 0;
            }
            return(flag);
        }
Ejemplo n.º 3
0
        protected bool GetSessionState(RailID userId, RailNetworkSessionState state)
        {
            //IL_000e: Unknown result type (might be due to invalid IL or missing references)
            IRailNetwork val = rail_api.RailFactory().RailNetworkHelper();

            if ((int)val.GetSessionState(userId, state) != 0)
            {
                WeGameHelper.WriteDebugString("GetSessionState Failed user:{0}", ((RailComparableID)userId).id_);
                return(false);
            }
            return(true);
        }
Ejemplo n.º 4
0
 private bool IsPacketAvailable(out uint size)
 {
     //IL_001b: Unknown result type (might be due to invalid IL or missing references)
     //IL_0021: Expected O, but got Unknown
     lock (RailLock)
     {
         IRailNetwork obj = rail_api.RailFactory().RailNetworkHelper();
         RailID       val = (RailID)(object)new RailID();
         ((RailComparableID)val).id_ = ((RailComparableID)GetLocalPeer()).id_;
         return(obj.IsDataReady(val, ref size));
     }
 }
        private bool CloseNetWorkSession(RailID remote_peer)
        {
            //IL_0018: Unknown result type (might be due to invalid IL or missing references)
            //IL_001e: Invalid comparison between Unknown and I4
            bool         result = false;
            IRailNetwork val    = rail_api.RailFactory().RailNetworkHelper();

            if (val != null)
            {
                result = (int)val.CloseSession(_serverID, remote_peer) == 0;
            }
            return(result);
        }
Ejemplo n.º 6
0
        private bool AcceptAnUserSession(RailID local_peer, RailID remote_peer)
        {
            bool flag = false;

            // ISSUE: explicit non-virtual call
            // ISSUE: explicit non-virtual call
            WeGameHelper.WriteDebugString("AcceptAnUserSession server:" + (((RailComparableID)local_peer).id_.ToString()) + " remote:" + (((RailComparableID)remote_peer).id_.ToString()));
            IRailNetwork irailNetwork = rail_api.RailFactory().RailNetworkHelper();

            if (irailNetwork != null)
            {
                flag = irailNetwork.AcceptSessionRequest(local_peer, remote_peer) == 0;
            }
            return(flag);
        }
        private bool AcceptAnUserSession(RailID local_peer, RailID remote_peer)
        {
            //IL_0043: Unknown result type (might be due to invalid IL or missing references)
            //IL_0049: Invalid comparison between Unknown and I4
            bool result = false;

            WeGameHelper.WriteDebugString("AcceptAnUserSession server:" + ((RailComparableID)local_peer).id_ + " remote:" + ((RailComparableID)remote_peer).id_);
            IRailNetwork val = rail_api.RailFactory().RailNetworkHelper();

            if (val != null)
            {
                result = (int)val.AcceptSessionRequest(local_peer, remote_peer) == 0;
            }
            return(result);
        }