修改多线程成单线程
This commit is contained in:
@@ -169,6 +169,7 @@ namespace RCUHost.Implement
|
||||
try
|
||||
{
|
||||
udpClient = new UdpClient(3339);
|
||||
udpClient.Client.ReceiveBufferSize = 2 * 1024 * 1024;
|
||||
uint IOC_IN = 0x80000000;
|
||||
uint IOC_VENDOR = 0x18000000;
|
||||
uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;
|
||||
@@ -179,7 +180,7 @@ namespace RCUHost.Implement
|
||||
|
||||
CSRedisCacheHelper.redis1.Del(UDPAllDataKey);
|
||||
CSRedisCacheHelper.redis1.XGroupCreate(UDPAllDataKey, "UDPData", "0", true);
|
||||
for (int i = 1; i <= 10; i++)
|
||||
for (int i = 1; i <= 15; i++)
|
||||
{
|
||||
Task.Factory.StartNew((iii) =>
|
||||
{
|
||||
@@ -1761,10 +1762,10 @@ namespace RCUHost.Implement
|
||||
public static object oo = new object();
|
||||
private void NewXieYi(ReceiverContext context_1, string hotelCode_1, string HostNNN_1, byte[] framenolist_1, byte cmdType_1, string EndPoint_1, ushort MyFrameNO)
|
||||
{
|
||||
var Tuple = new Tuple<ReceiverContext, string, string, byte[], byte, string>(context_1, hotelCode_1, HostNNN_1, framenolist_1, cmdType_1, EndPoint_1);
|
||||
Task.Factory.StartNew((state) =>
|
||||
{
|
||||
var ts = state as Tuple<ReceiverContext, string, string, byte[], byte, string>;
|
||||
var ts = new Tuple<ReceiverContext, string, string, byte[], byte, string>(context_1, hotelCode_1, HostNNN_1, framenolist_1, cmdType_1, EndPoint_1);
|
||||
//Task.Factory.StartNew((state) =>
|
||||
// {
|
||||
//var ts = state as Tuple<ReceiverContext, string, string, byte[], byte, string>;
|
||||
ReceiverContext context111 = ts.Item1;
|
||||
string hotelCode = ts.Item2;
|
||||
string HostNNN = ts.Item3;
|
||||
@@ -2743,7 +2744,7 @@ namespace RCUHost.Implement
|
||||
}
|
||||
#endregion
|
||||
|
||||
}, Tuple);
|
||||
//}, Tuple);
|
||||
}
|
||||
public struct JiNamTongPaiTeShu
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user