You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
763 B
C#
28 lines
763 B
C#
using NLog;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using TouchSocket.Sockets;
|
|
|
|
namespace Ems.CollectService.TouchSocket
|
|
{
|
|
internal class MyFixedHeaderCustomDataHandlingAdapter : CustomFixedHeaderDataHandlingAdapter<MyFixedHeaderRequestInfo>
|
|
{
|
|
private Logger logger = LogManager.GetCurrentClassLogger();
|
|
public override int HeaderLength => 10;
|
|
|
|
protected override MyFixedHeaderRequestInfo GetInstance()
|
|
{
|
|
try
|
|
{
|
|
return new MyFixedHeaderRequestInfo();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
logger.Error("TCP适配器异常",ex);
|
|
return new MyFixedHeaderRequestInfo();
|
|
}
|
|
}
|
|
}
|
|
}
|