Exemple #1
0
        public virtual bool RmiSend(HostID[] remotes, RmiContext rmiContext, Message msg, String rmiName, RmiID rmiID)
        {
            if (core.InstanceID == -1)
            {
                UnityEngine.Debug.Log("ProudNet RMI Proxy is not attached yet!");
                return(false);
            }

            Message frag = new Message();

            frag.Write((byte)1);

            frag.Data.AddRange(msg.Data.data, msg.Data.data.Length);

            JSRmiSend(core.InstanceID, Array.ConvertAll(remotes, value => (int)value), remotes.Length,
                      (int)rmiContext.reliability, (int)rmiContext.priority, (int)rmiContext.encryptMode, Misc.Base64Encode(frag.Data.data));

            if (internalUse == false)
            {
                MessageSummary msgSumm = new MessageSummary();
                msgSumm.payloadLength = sizeof(byte) + msg.Data.Count;
                msgSumm.rmiID         = rmiID;
                msgSumm.rmiName       = rmiName;
                msgSumm.encryptMode   = rmiContext.encryptMode;
                msgSumm.compressMode  = rmiContext.compressMode;

                if (enableNotifySendByProxy)
                {
                    NotifySendByProxy(remotes, msgSumm, rmiContext, msg);
                }
            }

            return(true);
        }
Exemple #2
0
 public virtual void NotifySendByProxy(HostID[] remotes, MessageSummary summary, RmiContext rmiContext, Message msg)
 {
 }