public void WaitSend(CSendContext ctx) { lock (mList.SyncRoot) { mList.Add(ctx); } }
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); } }