增加缓冲区大小

This commit is contained in:
2026-03-13 09:35:02 +08:00
parent d1a2319105
commit 03a27dbde8
2 changed files with 11 additions and 11 deletions

Binary file not shown.

View File

@@ -123,7 +123,7 @@ namespace RCUHost.Implement
try
{
var redis = CSRedisCacheHelper.redis1;
var data = redis.XReadGroup(group, consumer, 500, 10, new ValueTuple<string, string>(UDPAllDataKey, ">"));
var data = redis.XReadGroup(group, consumer, 1000, 10, new ValueTuple<string, string>(UDPAllDataKey, ">"));
if (data != null)
{
@@ -147,7 +147,7 @@ namespace RCUHost.Implement
}
catch (Exception ex)
{
logger.Error("消息队列失败:"+ex.Message);
}
}
@@ -169,7 +169,7 @@ namespace RCUHost.Implement
try
{
udpClient = new UdpClient(3339);
udpClient.Client.ReceiveBufferSize = 2 * 1024 * 1024;
udpClient.Client.ReceiveBufferSize = 5 * 1024 * 1024;
uint IOC_IN = 0x80000000;
uint IOC_VENDOR = 0x18000000;
uint SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12;
@@ -1314,7 +1314,7 @@ namespace RCUHost.Implement
//上线
//string EEE = CSRedisCacheHelper.Get<string>(EndPointStr);
var EEE = CSRedisCacheHelper.Get_Partition<string>(EndPointStr, 6);
var EEE = CSRedisCacheHelper.Get_Partition<string>(HostNNN, 6);
var dtstart = CSRedisCacheHelper.ForeverGet<string>(CacheKey.ServerStartTime);
DateTime SSS = DateTime.Now;
DateTime.TryParse(dtstart, out SSS);
@@ -1325,10 +1325,10 @@ namespace RCUHost.Implement
}
//6号分区 做离在线数据
//但是离线的时候只能得到Key值
CSRedisCacheHelper.Set_PartitionWithTime(EndPointStr, n, 5, 6);
CSRedisCacheHelper.Set_PartitionWithTime(HostNNN, n, 5, 6);
//所以4号分区再存储一下 详细信息
CSRedisCacheHelper.Set_PartitionWithTime(EndPointStr, n, 20, 4);
CSRedisCacheHelper.Set_PartitionWithTime(HostNNN, n, 20, 4);
@@ -1762,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 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>;
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>;
ReceiverContext context111 = ts.Item1;
string hotelCode = ts.Item2;
string HostNNN = ts.Item3;
@@ -2744,7 +2744,7 @@ namespace RCUHost.Implement
}
#endregion
//}, Tuple);
}, tuple);
}
public struct JiNamTongPaiTeShu
{