Exemple #1
0
 public void WaitSend(CSendContext ctx)
 {
     lock (mList.SyncRoot)
     {
         mList.Add(ctx);
     }
 }
Exemple #2
0
        public void WaitSend(CSendContext ctx)
        {
            CSendPipe pipe = (CSendPipe)mTable[ctx.IP + ":" + ctx.Port];

            if (pipe == null)
            {
                lock (mTable.SyncRoot)
                {
                    pipe = new CSendPipe(ctx.IP, ctx.Port);
                    pipe.OnSendOperate += new DeleSendOperate(DoSendOperate);
                    pipe.Start();
                    mTable.Add(pipe.Key, pipe);
                }
            }

            if (pipe != null)
            {
                pipe.WaitSend(ctx);
            }
        }