//APM/APMCommManager/APMCommManagerForm.cs
void recvWorker_DoWork(object sender, DoWorkEventArgs e)
{
byte[][] jsonByte = null;
jsonByte=____receiveRedis.BLPop("CLI:" + ClientCurrentId.GetInstance.MyId, 10);
for(ii=1; ii<jsonByte.Length; ii++)
{
byte[] ____jsonByte=new byte[jsonByte[ii].Length];
jsonByte[ii].CopyTo(____jsonByte, 0);
recvQueue.Enqueue(____jsonByte);// 데이타를 입력한다.
SendToTail()// 수신받은 데이타를 로그로 기록한다.
if( ! ____sendClientWorker.IsBusy) ____sendClientWorker.RunWorkerAsync();
}
}
//APM/APMCommManager/APMCommManagerForm.cs
void ____sendClientWorker_DoWork(object sender, DoWorkEventArgs e)
{
if(receiveQueue > 0)
{
byte[] buffer = receiveQueue.Dequeue(); //데이타를 꺼낸다.
CheckData(buffer);
}
}
//APM/APMCommManager/APMCommManagerForm.cs
void CheckData(byte[] buffer)
{
buffer -> jsonstring;
PWInterface ifReceive <- jsonstring;
string[] split = ifReceive.id.Split('.');
APMApiPublic.send((IntPtr)MetaData.APP_TYPE.NONE,
(IntPtr)Convert.ToInt64( split[1] ), buffer); //HANDLE(1)
}
'c# 언어 > 기타' 카테고리의 다른 글
Application.Perfomance.Management(Sending by Redis) (0) | 2022.01.13 |
---|