public void RegisteReceive(ProtocalType type, Action <string> onReceive)
    {
        if (onReceive != null)
        {
            receiver.RegisterEvent(type.ToString(), onReceive);
        }
#if UNITY_EDITOR
        waitDic[type] = onReceive;
#endif
    }
Ejemplo n.º 2
0
        public override string ToString()
        {
            var formatter = ObjectContainer.Current.Resolve <FormatterBase>(ProtocalType.ToString());

            return(formatter.Serialize(this));
        }
 public void AddSendQueue(ProtocalType type, string value)
 {
     sendQueue.Enqueue(new KeyValuePair <string, string>(type.ToString(), value));
 }
Ejemplo n.º 4
0
 public ApiNetServer()
 {
     Formatter = new NotSupportFormatter();
     Formatter = ObjectContainer.Current.Resolve <FormatterBase>(ProtocalType.ToString());
 }