Hai, Am doing a project of Transferring data over udp, Now am facing a problem,
Am Getting stream of data from two events.
event1 give
private void ondatareceived_one(byte[] values)
{
mixdata(1, values);
}
event2 give
private void ondatareceived_two(byte[] values)
{
mixdata(2, values);
}}
i have to mix this two byte array values
this events triggers 10 times per second
the mixing method is
Dictionary<int,byte[]> dict = new Dictionary<int,byte[]>();
private void mixdata(int index, byte[] values)
{
dict[index] = values;
if(dict.count==2)
{
list<byte[]> listdata= dict.values.Tolist();
dict.clear();
foreach (byte[] values in listdata)
{
}
}
}
This implementation is very slower, i need an alternate way which perfoms very faster..
Kindly help me...