first commit

This commit is contained in:
2026-09-02 16:31:50 +08:00
commit a461727193
911 changed files with 692450 additions and 0 deletions
@@ -0,0 +1,19 @@
using DotNetty.Transport.Channels;
using JSMachine.WMS.Netty.Common.Util;
using System.ComponentModel.Composition;
using System.Threading.Tasks;
namespace JSMachine.WMS.Netty.NettyUdp.CommandHandler
{
/// <summary>
/// 处理基类
/// </summary>
[InheritedExport("NettyUdp")]
public abstract class BaseCmdhandler
{
public IChannelHandlerContext Channel { get; set; }
public IPInfo RemoteIPInfo => Channel.ToIPInfo(AddressOnwer.Remote);
public abstract Task<bool> Handle(string msg);
}
}
@@ -0,0 +1,29 @@
using JSMachine.WMS.Netty.NettyUdp.Command;
using System;
using System.Threading.Tasks;
namespace JSMachine.WMS.Netty.NettyUdp.CommandHandler
{
/// <summary>
/// 命令处理器
/// </summary>
public class ShipDynamicsMsgHandler : BaseCmdhandler
{
public async override Task<bool> Handle(string msg)
{
return await Task.Run(() =>
{
try
{
return true;
}
catch (Exception ex)
{
return false;
}
});
}
}
}