Example #1
0
        // We should call this function first in main thread
        public static ServiceSlots GetInstance()
        {
            if (m_instance == null)
            {
                m_instance = new ServiceSlots();
            }

            return(m_instance);
        }
Example #2
0
        private void PushToService(int destination, string method, byte[] param, MessageType type, int session)
        {
            Message msg = new Message();

            msg.Source      = m_serviceAddress;
            msg.Destination = destination;
            msg.Method      = method;
            msg.Data        = param;
            msg.RPCSession  = session;
            msg.Type        = type;

            ServiceContext targetService = ServiceSlots.GetInstance().Get(destination);

            targetService.Push(msg);
        }
Example #3
0
        protected void Call(string destination, string method, byte[] param, SSContext context, RPCCallback cb)
        {
            int serviceId = ServiceSlots.GetInstance().Name2Id(destination);

            Call(serviceId, method, param, context, cb);
        }
Example #4
0
        protected void Send(string destination, string method, byte[] param)
        {
            int serviceId = ServiceSlots.GetInstance().Name2Id(destination);

            Send(serviceId, method, param);
        }