22 lines
700 B
C#
22 lines
700 B
C#
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);
|
|
|
|
}
|
|
}
|