Пример #1
0
 public void Init(int id)
 {
     recvBufferQueue = new Queue<byte[]>();
     ipcInfo = IPCConfig.GetIPCInfo(id);
     rpcManager = new RPCManager();
     rpcManager.Init();
 }
Пример #2
0
 public void Clean()
 {
     Stop();
     ipcInfo = null;
     lock (recvBufferQueue)
     {
         recvBufferQueue.Clear();
         recvBufferQueue = null;
     }
     byteBuffer = null;
     rpcManager.Clean();
     rpcManager = null;
 }
Пример #3
0
 private static void ReadConfig()
 {
     IPCInfos.Clear();
     using (StreamReader stream = new StreamReader(ConfigPath))
     {
         string line;
         while ((line = stream.ReadLine()) != null)
         {
             IPCInfo  info  = new IPCInfo();
             string[] infos = line.Split('|');
             info.ID   = int.Parse(infos[0]);
             info.Port = int.Parse(infos[1]);
             IPCInfos.Add(info.ID, info);
         }
     }
 }