Files
ww-jst/wmsjst/JSMachine.WMS.Netty/NettyAsServer/CommandHandler/BaseCmdhandler.cs
T

22 lines
700 B
C#
Raw Normal View History

2026-09-02 16:31:50 +08:00
using DotNetty.Transport.Channels;
using JSMachine.WMS.Netty.Common.Util;
using JSMachine.WMS.Netty.NettyAsServer.Command;
using Prism.Events;
using Prism.Ioc;
using System.ComponentModel.Composition;
using System.Threading.Tasks;
namespace JSMachine.WMS.Netty.NettyAsServer.CommandHandler
{
[InheritedExport("NettyAsServer")]
public abstract class BaseCmdhandler
{
protected static IEventAggregator IEventAggregator=ContainerLocator.Container.Resolve<IEventAggregator>();
public IChannelHandlerContext Channel { get; set; }
public IPInfo RemoteIPInfo => Channel.ToIPInfo(AddressOnwer.Remote);
public abstract Task<bool> Handle(BaseCmd msg);
}
}