添加发送encode

master
CZ 8 months ago
commit 9928a412db

11
.gitignore vendored

@ -1,6 +1,13 @@
/.idea/** /.idea/**
**/obj/** **/obj/
**/bin/** **/bin/
.vs/
WebStarter/obj
WebStarter/bin
WinFormStarter/obj
WinFormStarter/bin
/HybirdFrameworkCore/obj/
## Ignore Visual Studio temporary files, build results, and ## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons. ## files generated by popular Visual Studio add-ons.

Binary file not shown.

@ -0,0 +1,19 @@
namespace HybirdFrameworkCore.Autofac.Attribute;
public class ScopeAttribute : System.Attribute
{
public string scope;
public ScopeAttribute(string scope)
{
this.scope = scope;
}
}
public class ScopeConst
{
public static readonly string InstancePerLifetimeScope = "InstancePerLifetimeScope" ;
public static readonly string SingleInstance = "SingleInstance";
public static readonly string InstancePerDependency = "InstancePerDependency";
}

@ -1,19 +1,23 @@
using System.Reflection; using System.Reflection;
using Autofac; using Autofac;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
using Module = Autofac.Module; using Module = Autofac.Module;
namespace HybirdFrameworkCore.Autofac namespace HybirdFrameworkCore.Autofac
{ {
public class AutofacModuleRegister : Module public class AutofacModuleRegister : Module
{ {
private readonly ILog Log = LogManager.GetLogger(typeof(AutofacModuleRegister));
protected override void Load(ContainerBuilder builder) protected override void Load(ContainerBuilder builder)
{ {
var basePath = AppContext.BaseDirectory; var basePath = AppContext.BaseDirectory;
#region 带有接口层的服务注入 #region 带有接口层的服务注入
var servicesDllFile = Path.Combine(basePath, "HybirdFrameworkRepository.dll"); var repositoryDllFile = Path.Combine(basePath, "HybirdFrameworkRepository.dll");
var repositoryDllFile = Path.Combine(basePath, "HybirdFrameworkServices.dll"); var servicesDllFile = Path.Combine(basePath, "HybirdFrameworkServices.dll");
if (!(File.Exists(servicesDllFile) && File.Exists(repositoryDllFile))) if (!(File.Exists(servicesDllFile) && File.Exists(repositoryDllFile)))
{ {
@ -35,17 +39,61 @@ namespace HybirdFrameworkCore.Autofac
//} //}
// 获取 Service.dll 程序集服务,并注册 // 获取 Service.dll 程序集服务,并注册
var assemblysServices = Assembly.LoadFrom(servicesDllFile); SplitInject(Assembly.LoadFrom(servicesDllFile), builder);
builder.RegisterTypes(assemblysServices.ExportedTypes.ToArray()).SingleInstance()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); //支持属性注入依赖重复
// 获取 Repository.dll 程序集服务,并注册 // 获取 Repository.dll 程序集服务,并注册
var assemblysRepository = Assembly.LoadFrom(repositoryDllFile); SplitInject(Assembly.LoadFrom(repositoryDllFile), builder);
builder.RegisterTypes(assemblysRepository.ExportedTypes.ToArray()).SingleInstance()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); //支持属性注入依赖重复
#endregion #endregion
} }
private void SplitInject(Assembly assemblysServices, ContainerBuilder builder)
{
List<Type> InstancePerLifetimeScopeList = new List<Type>();
List<Type> instancePerDependencyList = new List<Type>();
List<Type> defaultList = new List<Type>();
foreach (var type in assemblysServices.ExportedTypes)
{
ScopeAttribute? scope = type.GetCustomAttribute<ScopeAttribute>();
if (scope != null)
{
if (ScopeConst.InstancePerLifetimeScope == scope.scope)
{
InstancePerLifetimeScopeList.Add(type);
}
else if (ScopeConst.InstancePerDependency == scope.scope)
{
instancePerDependencyList.Add(type);
}
else
{
defaultList.Add(type);
}
}
else
{
defaultList.Add(type);
}
}
if (defaultList.Count > 0)
{
builder.RegisterTypes(defaultList.ToArray()).SingleInstance()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); //支持属性注入依赖重复
}
if (instancePerDependencyList.Count > 0)
{
builder.RegisterTypes(instancePerDependencyList.ToArray()).InstancePerDependency()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); //支持属性注入依赖重复
}
if (InstancePerLifetimeScopeList.Count > 0)
{
builder.RegisterTypes(InstancePerLifetimeScopeList.ToArray()).InstancePerMatchingLifetimeScope()
.PropertiesAutowired(PropertyWiringOptions.AllowCircularDependencies); //支持属性注入依赖重复
}
}
} }
} }

@ -8,6 +8,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac" Version="7.0.1" /> <PackageReference Include="Autofac" Version="7.0.1" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="7.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" />

@ -11,7 +11,8 @@
"Autofac": "7.0.1", "Autofac": "7.0.1",
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0", "Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
"Microsoft.Extensions.Configuration.Json": "7.0.0", "Microsoft.Extensions.Configuration.Json": "7.0.0",
"Newtonsoft.Json": "13.0.3" "Newtonsoft.Json": "13.0.3",
"log4net": "2.0.15"
}, },
"runtime": { "runtime": {
"HybirdFrameworkCore.dll": {} "HybirdFrameworkCore.dll": {}
@ -28,6 +29,17 @@
} }
} }
}, },
"log4net/2.0.15": {
"dependencies": {
"System.Configuration.ConfigurationManager": "4.5.0"
},
"runtime": {
"lib/netstandard2.0/log4net.dll": {
"assemblyVersion": "2.0.15.0",
"fileVersion": "2.0.15.0"
}
}
},
"Microsoft.Extensions.Configuration/7.0.0": { "Microsoft.Extensions.Configuration/7.0.0": {
"dependencies": { "dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "7.0.0", "Microsoft.Extensions.Configuration.Abstractions": "7.0.0",
@ -124,6 +136,7 @@
} }
} }
}, },
"Microsoft.NETCore.Platforms/2.0.0": {},
"Newtonsoft.Json/13.0.3": { "Newtonsoft.Json/13.0.3": {
"runtime": { "runtime": {
"lib/net6.0/Newtonsoft.Json.dll": { "lib/net6.0/Newtonsoft.Json.dll": {
@ -132,8 +145,58 @@
} }
} }
}, },
"System.Configuration.ConfigurationManager/4.5.0": {
"dependencies": {
"System.Security.Cryptography.ProtectedData": "4.5.0",
"System.Security.Permissions": "4.5.0"
},
"runtime": {
"lib/netstandard2.0/System.Configuration.ConfigurationManager.dll": {
"assemblyVersion": "4.0.1.0",
"fileVersion": "4.6.26515.6"
}
}
},
"System.Diagnostics.DiagnosticSource/4.7.1": {}, "System.Diagnostics.DiagnosticSource/4.7.1": {},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {}, "System.Runtime.CompilerServices.Unsafe/6.0.0": {},
"System.Security.AccessControl/4.5.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "2.0.0",
"System.Security.Principal.Windows": "4.5.0"
}
},
"System.Security.Cryptography.ProtectedData/4.5.0": {
"runtime": {
"lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.6.26515.6"
}
},
"runtimeTargets": {
"runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.6.26515.6"
}
}
},
"System.Security.Permissions/4.5.0": {
"dependencies": {
"System.Security.AccessControl": "4.5.0"
},
"runtime": {
"lib/netstandard2.0/System.Security.Permissions.dll": {
"assemblyVersion": "4.0.1.0",
"fileVersion": "4.6.26515.6"
}
}
},
"System.Security.Principal.Windows/4.5.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "2.0.0"
}
},
"System.Text.Encodings.Web/7.0.0": { "System.Text.Encodings.Web/7.0.0": {
"dependencies": { "dependencies": {
"System.Runtime.CompilerServices.Unsafe": "6.0.0" "System.Runtime.CompilerServices.Unsafe": "6.0.0"
@ -180,6 +243,13 @@
"path": "autofac/7.0.1", "path": "autofac/7.0.1",
"hashPath": "autofac.7.0.1.nupkg.sha512" "hashPath": "autofac.7.0.1.nupkg.sha512"
}, },
"log4net/2.0.15": {
"type": "package",
"serviceable": true,
"sha512": "sha512-GahnO9ZgFka+xYcFwAfIFjW+k86P2nxFoaEpH6t3v4hiGj7tv2ksVZphxCVIHmJxoySS0HeU3dgCW+bSCcfD0A==",
"path": "log4net/2.0.15",
"hashPath": "log4net.2.0.15.nupkg.sha512"
},
"Microsoft.Extensions.Configuration/7.0.0": { "Microsoft.Extensions.Configuration/7.0.0": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
@ -236,6 +306,13 @@
"path": "microsoft.extensions.primitives/7.0.0", "path": "microsoft.extensions.primitives/7.0.0",
"hashPath": "microsoft.extensions.primitives.7.0.0.nupkg.sha512" "hashPath": "microsoft.extensions.primitives.7.0.0.nupkg.sha512"
}, },
"Microsoft.NETCore.Platforms/2.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-VdLJOCXhZaEMY7Hm2GKiULmn7IEPFE4XC5LPSfBVCUIA8YLZVh846gtfBJalsPQF2PlzdD7ecX7DZEulJ402ZQ==",
"path": "microsoft.netcore.platforms/2.0.0",
"hashPath": "microsoft.netcore.platforms.2.0.0.nupkg.sha512"
},
"Newtonsoft.Json/13.0.3": { "Newtonsoft.Json/13.0.3": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
@ -243,6 +320,13 @@
"path": "newtonsoft.json/13.0.3", "path": "newtonsoft.json/13.0.3",
"hashPath": "newtonsoft.json.13.0.3.nupkg.sha512" "hashPath": "newtonsoft.json.13.0.3.nupkg.sha512"
}, },
"System.Configuration.ConfigurationManager/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-UIFvaFfuKhLr9u5tWMxmVoDPkFeD+Qv8gUuap4aZgVGYSYMdERck4OhLN/2gulAc0nYTEigWXSJNNWshrmxnng==",
"path": "system.configuration.configurationmanager/4.5.0",
"hashPath": "system.configuration.configurationmanager.4.5.0.nupkg.sha512"
},
"System.Diagnostics.DiagnosticSource/4.7.1": { "System.Diagnostics.DiagnosticSource/4.7.1": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,
@ -257,6 +341,34 @@
"path": "system.runtime.compilerservices.unsafe/6.0.0", "path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512" "hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
}, },
"System.Security.AccessControl/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-vW8Eoq0TMyz5vAG/6ce483x/CP83fgm4SJe5P8Tb1tZaobcvPrbMEL7rhH1DRdrYbbb6F0vq3OlzmK0Pkwks5A==",
"path": "system.security.accesscontrol/4.5.0",
"hashPath": "system.security.accesscontrol.4.5.0.nupkg.sha512"
},
"System.Security.Cryptography.ProtectedData/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-wLBKzFnDCxP12VL9ANydSYhk59fC4cvOr9ypYQLPnAj48NQIhqnjdD2yhP8yEKyBJEjERWS9DisKL7rX5eU25Q==",
"path": "system.security.cryptography.protecteddata/4.5.0",
"hashPath": "system.security.cryptography.protecteddata.4.5.0.nupkg.sha512"
},
"System.Security.Permissions/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-9gdyuARhUR7H+p5CjyUB/zPk7/Xut3wUSP8NJQB6iZr8L3XUXTMdoLeVAg9N4rqF8oIpE7MpdqHdDHQ7XgJe0g==",
"path": "system.security.permissions/4.5.0",
"hashPath": "system.security.permissions.4.5.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.5.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-U77HfRXlZlOeIXd//Yoj6Jnk8AXlbeisf1oq1os+hxOGVnuG+lGSfGqTwTZBoORFF6j/0q7HXIl8cqwQ9aUGqQ==",
"path": "system.security.principal.windows/4.5.0",
"hashPath": "system.security.principal.windows.4.5.0.nupkg.sha512"
},
"System.Text.Encodings.Web/7.0.0": { "System.Text.Encodings.Web/7.0.0": {
"type": "package", "type": "package",
"serviceable": true, "serviceable": true,

@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HybirdFrameworkServices.Netty
{
internal class Class1
{
}
}

@ -0,0 +1,15 @@
using DotNetty.Buffers;
using DotNetty.Codecs;
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
namespace HybirdFrameworkServices.Netty;
[Scope("InstancePerDependency")]
public class Decoder : ByteToMessageDecoder
{
protected override void Decode(IChannelHandlerContext context, IByteBuffer input, List<object> output)
{
throw new NotImplementedException();
}
}

@ -0,0 +1,15 @@
using DotNetty.Buffers;
using DotNetty.Codecs;
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
namespace HybirdFrameworkServices.Netty;
[Scope("InstancePerDependency")]
public class Encoder : MessageToByteEncoder<byte[]>
{
protected override void Encode(IChannelHandlerContext context, byte[] message, IByteBuffer output)
{
output.WriteBytes(message);
}
}

@ -0,0 +1,18 @@
using DotNetty.Buffers;
using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net;
namespace HybirdFrameworkServices.Netty;
[Scope("InstancePerDependency")]
public class MsgHandler : ChannelHandlerAdapter
{
private readonly ILog Log = LogManager.GetLogger(typeof(MsgHandler));
public override void ChannelRead(IChannelHandlerContext ctx, object msg)
{
Log.Info($"{this.GetHashCode()} read from {ctx.Channel.RemoteAddress}");
ctx.WriteAndFlushAsync(Unpooled.WrappedBuffer(new byte[] { 1, 2, 3, 4, 5, 6, 7 }));
}
}

@ -1,4 +1,6 @@
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Net;
using System.Runtime.CompilerServices;
using System.Threading.Channels; using System.Threading.Channels;
using DotNetty.Buffers; using DotNetty.Buffers;
using DotNetty.Handlers.Logging; using DotNetty.Handlers.Logging;
@ -6,6 +8,8 @@ using DotNetty.Handlers.Timeout;
using DotNetty.Transport.Bootstrapping; using DotNetty.Transport.Bootstrapping;
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using DotNetty.Transport.Channels.Sockets; using DotNetty.Transport.Channels.Sockets;
using HybirdFrameworkCore.Autofac.Attribute;
using HybirdFrameworkServices.System;
using log4net; using log4net;
using Module.Socket.Tool; using Module.Socket.Tool;
@ -14,25 +18,15 @@ namespace HybirdFrameworkServices.Netty
/// <summary> /// <summary>
/// netty server /// netty server
/// </summary> /// </summary>
[Scope("SingleInstance")]
public class Server : IDisposable public class Server : IDisposable
{ {
private readonly ILog Log = LogManager.GetLogger(typeof(Server)); private readonly ILog Log = LogManager.GetLogger(typeof(Server));
/// <summary>
/// 接受客户端的连接
/// </summary>
static MultithreadEventLoopGroup? bossGroup; static MultithreadEventLoopGroup? bossGroup;
/// <summary>
/// 处理已经被接受的连接
/// </summary>
static MultithreadEventLoopGroup? workerGroup; static MultithreadEventLoopGroup? workerGroup;
/// <summary>
/// Netty服务器的启动辅助类用于配置和启动服务器
/// </summary>
static ServerBootstrap? bootstrap; static ServerBootstrap? bootstrap;
/// <summary>
/// 是一个线程安全的字典用于存储与客户端连接的通道IChannel
/// </summary>
static ConcurrentDictionary<IChannelId, IChannel> _container = ServerListenerHandler.Container; static ConcurrentDictionary<IChannelId, IChannel> _container = ServerListenerHandler.Container;
private int _port = 9000; private int _port = 9000;
@ -48,12 +42,11 @@ namespace HybirdFrameworkServices.Netty
bootstrap bootstrap
.Group(bossGroup, workerGroup) // 设置主和工作线程组 .Group(bossGroup, workerGroup) // 设置主和工作线程组
.Channel<TcpServerSocketChannel>() // 设置通道模式为TcpSocket .Channel<TcpServerSocketChannel>() // 设置通道模式为TcpSocket
.Option(ChannelOption.SoKeepalive, true) //设置TCP连接socket,保持连接 .Option(ChannelOption.SoKeepalive, true) //保持连接
.Handler(new LoggingHandler())//添加log处理日志 .Handler(new LoggingHandler())
.ChildHandler(new ActionChannelInitializer<ISocketChannel>(channel => .ChildHandler(new ActionChannelInitializer<ISocketChannel>(channel =>
{ {
var serverListenerHandler = new ServerListenerHandler(); var serverListenerHandler = new ServerListenerHandler();
IChannelPipeline pipeline = channel.Pipeline; IChannelPipeline pipeline = channel.Pipeline;
pipeline.AddLast(new LoggingHandler("")); pipeline.AddLast(new LoggingHandler(""));
pipeline.AddLast(serverListenerHandler); pipeline.AddLast(serverListenerHandler);
@ -63,17 +56,17 @@ namespace HybirdFrameworkServices.Netty
//业务handler 这里是实际处理业务的Handler //业务handler 这里是实际处理业务的Handler
pipeline.AddLast(new CustomFrameDecoder4(new IByteBuffer[] { delimiter }, false, false)); pipeline.AddLast(new CustomFrameDecoder4(new IByteBuffer[] { delimiter }, false, false));
pipeline.AddLast(new CustomFrameEncoder());
pipeline.AddLast("idleStateHandler", new IdleStateHandler(30, 0, 0)); // 触发读取超时 //pipeline.AddLast("idleStateHandler", new IdleStateHandler(30, 0, 0)); // 触发读取超时
//pipeline.AddLast(new ReconnectHandler(this)); //pipeline.AddLast(new ReconnectHandler(this));
//pipeline.AddLast(new ClientHandler(this)); //pipeline.AddLast(new ClientHandler(this));
})); }));
Begin(_port); Begin(_port);
} }
private void Begin(int port) public void Begin(int port)
{ {
_port = port; _port = port;
Log.Info(" Start Listen"); Log.Info(" Start Listen");
@ -81,7 +74,7 @@ namespace HybirdFrameworkServices.Netty
Log.Info($"netty success listen {_port}"); Log.Info($"netty success listen {_port}");
} }
public static void Send(byte[] bytes) public void Send(byte[] bytes)
{ {
foreach (IChannel channel in _container.Values) foreach (IChannel channel in _container.Values)
{ {
@ -91,8 +84,9 @@ namespace HybirdFrameworkServices.Netty
/// <summary> /// <summary>
/// ??netty 释放资源 /// ??netty
/// </summary> /// </summary>
public void Dispose() public void Dispose()
{ {

@ -1,9 +1,11 @@
using System.Collections.Concurrent; using System.Collections.Concurrent;
using DotNetty.Transport.Channels; using DotNetty.Transport.Channels;
using HybirdFrameworkCore.Autofac.Attribute;
using log4net; using log4net;
namespace HybirdFrameworkServices.Netty namespace HybirdFrameworkServices.Netty
{ {
[Scope("InstancePerDependency")]
public class ServerListenerHandler : ChannelHandlerAdapter public class ServerListenerHandler : ChannelHandlerAdapter
{ {
private readonly ILog Log = LogManager.GetLogger(typeof(ServerListenerHandler)); private readonly ILog Log = LogManager.GetLogger(typeof(ServerListenerHandler));
@ -25,7 +27,6 @@ namespace HybirdFrameworkServices.Netty
public override void ChannelRegistered(IChannelHandlerContext context) public override void ChannelRegistered(IChannelHandlerContext context)
{ {
base.ChannelRegistered(context); base.ChannelRegistered(context);
Container[context.Channel.Id] = context.Channel;
SendClientIp(); SendClientIp();
Log.Info("register " + context.Channel); Log.Info("register " + context.Channel);
} }
@ -33,8 +34,6 @@ namespace HybirdFrameworkServices.Netty
public override void ChannelUnregistered(IChannelHandlerContext context) public override void ChannelUnregistered(IChannelHandlerContext context)
{ {
base.ChannelUnregistered(context); base.ChannelUnregistered(context);
IChannel? o;
Container.Remove(context.Channel.Id, out o);
SendClientIp(); SendClientIp();
Log.Info("unregister " + context.Channel); Log.Info("unregister " + context.Channel);
} }
@ -42,12 +41,15 @@ namespace HybirdFrameworkServices.Netty
public override void ChannelActive(IChannelHandlerContext context) public override void ChannelActive(IChannelHandlerContext context)
{ {
base.ChannelActive(context); base.ChannelActive(context);
Container[context.Channel.Id] = context.Channel;
Log.Info("active " + context.Channel); Log.Info("active " + context.Channel);
} }
public override void ChannelInactive(IChannelHandlerContext context) public override void ChannelInactive(IChannelHandlerContext context)
{ {
base.ChannelInactive(context); base.ChannelInactive(context);
IChannel? o;
Container.Remove(context.Channel.Id, out o);
Log.Info("inactive " + context.Channel); Log.Info("inactive " + context.Channel);
} }
@ -68,4 +70,3 @@ namespace HybirdFrameworkServices.Netty
} }
} }
} }

@ -0,0 +1,8 @@
using Autofac;
namespace HybirdFrameworkServices.System;
public class AppInfo
{
public static IContainer Container { get; set; }
}

@ -1,12 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace HybirdFrameworkServices.System
{
internal class Class1
{
}
}

@ -101,7 +101,7 @@ namespace Module.Socket.Tool
new Decode().decode(ipAddress, port, bytes); new Decode().decode(ipAddress, port, bytes);
} }
} }
//ctx.Channel.WriteAsync(bytes); //ctx.Channel.WriteAndFlushAsync(bytes);
} }
output.Add(bytes); output.Add(bytes);
} }

@ -0,0 +1,21 @@
using DotNetty.Buffers;
using DotNetty.Codecs;
using DotNetty.Common.Utilities;
using DotNetty.Transport.Channels;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Module.Socket.Tool
{
public class CustomFrameEncoder : MessageToByteEncoder<byte[]>
{
protected override void Encode(IChannelHandlerContext context, byte[] message, IByteBuffer output)
{
output.WriteBytes(message);
}
}
}

File diff suppressed because it is too large Load Diff

@ -1,4 +1,9 @@
namespace WinFormStarter; using static System.Net.Mime.MediaTypeNames;
using System.Drawing.Printing;
using System.Windows.Forms;
using System.Xml.Linq;
namespace WinFormStarter;
partial class Form1 partial class Form1
{ {
@ -65,12 +70,14 @@ partial class Form1
btnCmd1107 = new Button(); btnCmd1107 = new Button();
groupBox9 = new GroupBox(); groupBox9 = new GroupBox();
groupBox3 = new GroupBox(); groupBox3 = new GroupBox();
lstBoxConnect = new ListBox();
label3 = new Label(); label3 = new Label();
txtDestAddr = new TextBox(); txtDestAddr = new TextBox();
label2 = new Label(); label2 = new Label();
txtChargePort = new TextBox(); txtChargePort = new TextBox();
BtnCloseConnect = new Button(); BtnCloseConnect = new Button();
BtnChrg01Connect = new Button(); BtnChrg01Connect = new Button();
groupBox1 = new GroupBox();
groupBox5 = new GroupBox(); groupBox5 = new GroupBox();
lstSendFrameInfo = new ListBox(); lstSendFrameInfo = new ListBox();
groupBox8 = new GroupBox(); groupBox8 = new GroupBox();
@ -78,6 +85,7 @@ partial class Form1
btnCmd3 = new Button(); btnCmd3 = new Button();
btnCmd1 = new Button(); btnCmd1 = new Button();
btnCmd5 = new Button(); btnCmd5 = new Button();
groupBox2 = new GroupBox();
groupBox10.SuspendLayout(); groupBox10.SuspendLayout();
groupBox16.SuspendLayout(); groupBox16.SuspendLayout();
groupBox15.SuspendLayout(); groupBox15.SuspendLayout();
@ -94,7 +102,7 @@ partial class Form1
// //
// button1 // button1
// //
button1.Location = new Point(1087, -2); button1.Location = new Point(1085, 0);
button1.Margin = new Padding(2, 1, 2, 1); button1.Margin = new Padding(2, 1, 2, 1);
button1.Name = "button1"; button1.Name = "button1";
button1.Size = new Size(100, 28); button1.Size = new Size(100, 28);
@ -106,10 +114,10 @@ partial class Form1
// groupBox10 // groupBox10
// //
groupBox10.Controls.Add(btnCmd113); groupBox10.Controls.Add(btnCmd113);
groupBox10.Location = new Point(599, 139); groupBox10.Location = new Point(589, 130);
groupBox10.Name = "groupBox10"; groupBox10.Name = "groupBox10";
groupBox10.Size = new Size(136, 65); groupBox10.Size = new Size(136, 65);
groupBox10.TabIndex = 169; groupBox10.TabIndex = 157;
groupBox10.TabStop = false; groupBox10.TabStop = false;
groupBox10.Text = "答充电桩上报充电"; groupBox10.Text = "答充电桩上报充电";
// //
@ -128,11 +136,11 @@ partial class Form1
lstRecvFrameInfo.Anchor = AnchorStyles.None; lstRecvFrameInfo.Anchor = AnchorStyles.None;
lstRecvFrameInfo.FormattingEnabled = true; lstRecvFrameInfo.FormattingEnabled = true;
lstRecvFrameInfo.ItemHeight = 20; lstRecvFrameInfo.ItemHeight = 20;
lstRecvFrameInfo.Location = new Point(12, 704); lstRecvFrameInfo.Location = new Point(2, 695);
lstRecvFrameInfo.Margin = new Padding(5); lstRecvFrameInfo.Margin = new Padding(5);
lstRecvFrameInfo.Name = "lstRecvFrameInfo"; lstRecvFrameInfo.Name = "lstRecvFrameInfo";
lstRecvFrameInfo.Size = new Size(1130, 124); lstRecvFrameInfo.Size = new Size(1130, 124);
lstRecvFrameInfo.TabIndex = 158; lstRecvFrameInfo.TabIndex = 145;
// //
// groupBox16 // groupBox16
// //
@ -143,10 +151,10 @@ partial class Form1
groupBox16.Controls.Add(btnCmd1001); groupBox16.Controls.Add(btnCmd1001);
groupBox16.Controls.Add(btnCmd1003); groupBox16.Controls.Add(btnCmd1003);
groupBox16.Controls.Add(btnCmd1007); groupBox16.Controls.Add(btnCmd1007);
groupBox16.Location = new Point(17, 316); groupBox16.Location = new Point(7, 307);
groupBox16.Name = "groupBox16"; groupBox16.Name = "groupBox16";
groupBox16.Size = new Size(1007, 75); groupBox16.Size = new Size(1007, 75);
groupBox16.TabIndex = 166; groupBox16.TabIndex = 154;
groupBox16.TabStop = false; groupBox16.TabStop = false;
groupBox16.Text = "升级命令"; groupBox16.Text = "升级命令";
// //
@ -224,10 +232,10 @@ partial class Form1
// //
groupBox15.Controls.Add(btnCmd421); groupBox15.Controls.Add(btnCmd421);
groupBox15.Controls.Add(btnCmd401); groupBox15.Controls.Add(btnCmd401);
groupBox15.Location = new Point(886, 139); groupBox15.Location = new Point(876, 130);
groupBox15.Name = "groupBox15"; groupBox15.Name = "groupBox15";
groupBox15.Size = new Size(271, 75); groupBox15.Size = new Size(271, 75);
groupBox15.TabIndex = 167; groupBox15.TabIndex = 155;
groupBox15.TabStop = false; groupBox15.TabStop = false;
groupBox15.Text = "历史数据"; groupBox15.Text = "历史数据";
// //
@ -255,10 +263,10 @@ partial class Form1
// //
groupBox14.Controls.Add(btnCmd301); groupBox14.Controls.Add(btnCmd301);
groupBox14.Controls.Add(btnCmd303); groupBox14.Controls.Add(btnCmd303);
groupBox14.Location = new Point(886, 235); groupBox14.Location = new Point(876, 226);
groupBox14.Name = "groupBox14"; groupBox14.Name = "groupBox14";
groupBox14.Size = new Size(273, 75); groupBox14.Size = new Size(273, 75);
groupBox14.TabIndex = 168; groupBox14.TabIndex = 156;
groupBox14.TabStop = false; groupBox14.TabStop = false;
groupBox14.Text = "直流充电桩BMS信息数据预留"; groupBox14.Text = "直流充电桩BMS信息数据预留";
// //
@ -290,10 +298,10 @@ partial class Form1
groupBox13.Controls.Add(btnCmd201); groupBox13.Controls.Add(btnCmd201);
groupBox13.Controls.Add(btnCmd203); groupBox13.Controls.Add(btnCmd203);
groupBox13.Controls.Add(btnCmd207); groupBox13.Controls.Add(btnCmd207);
groupBox13.Location = new Point(17, 235); groupBox13.Location = new Point(7, 226);
groupBox13.Name = "groupBox13"; groupBox13.Name = "groupBox13";
groupBox13.Size = new Size(858, 75); groupBox13.Size = new Size(858, 75);
groupBox13.TabIndex = 163; groupBox13.TabIndex = 151;
groupBox13.TabStop = false; groupBox13.TabStop = false;
groupBox13.Text = "充电信息数据"; groupBox13.Text = "充电信息数据";
// //
@ -361,10 +369,10 @@ partial class Form1
// //
groupBox7.Controls.Add(btnCmd1401); groupBox7.Controls.Add(btnCmd1401);
groupBox7.Controls.Add(btnCmd1406); groupBox7.Controls.Add(btnCmd1406);
groupBox7.Location = new Point(743, 404); groupBox7.Location = new Point(733, 395);
groupBox7.Name = "groupBox7"; groupBox7.Name = "groupBox7";
groupBox7.Size = new Size(281, 75); groupBox7.Size = new Size(281, 75);
groupBox7.TabIndex = 164; groupBox7.TabIndex = 152;
groupBox7.TabStop = false; groupBox7.TabStop = false;
groupBox7.Text = "FTP远程升级、FTP日志上传"; groupBox7.Text = "FTP远程升级、FTP日志上传";
// //
@ -391,10 +399,10 @@ partial class Form1
// groupBox6 // groupBox6
// //
groupBox6.Controls.Add(btnCmd1301); groupBox6.Controls.Add(btnCmd1301);
groupBox6.Location = new Point(590, 404); groupBox6.Location = new Point(580, 395);
groupBox6.Name = "groupBox6"; groupBox6.Name = "groupBox6";
groupBox6.Size = new Size(130, 75); groupBox6.Size = new Size(130, 75);
groupBox6.TabIndex = 165; groupBox6.TabIndex = 153;
groupBox6.TabStop = false; groupBox6.TabStop = false;
groupBox6.Text = "白名单报文"; groupBox6.Text = "白名单报文";
// //
@ -414,10 +422,10 @@ partial class Form1
groupBox4.Controls.Add(btnCmd1101); groupBox4.Controls.Add(btnCmd1101);
groupBox4.Controls.Add(btnCmd1103); groupBox4.Controls.Add(btnCmd1103);
groupBox4.Controls.Add(btnCmd1107); groupBox4.Controls.Add(btnCmd1107);
groupBox4.Location = new Point(15, 404); groupBox4.Location = new Point(5, 395);
groupBox4.Name = "groupBox4"; groupBox4.Name = "groupBox4";
groupBox4.Size = new Size(562, 75); groupBox4.Size = new Size(562, 75);
groupBox4.TabIndex = 162; groupBox4.TabIndex = 150;
groupBox4.TabStop = false; groupBox4.TabStop = false;
groupBox4.Text = "与计费策略相关的指令"; groupBox4.Text = "与计费策略相关的指令";
// //
@ -464,16 +472,18 @@ partial class Form1
// groupBox9 // groupBox9
// //
groupBox9.Controls.Add(groupBox3); groupBox9.Controls.Add(groupBox3);
groupBox9.Location = new Point(14, 35); groupBox9.Controls.Add(groupBox1);
groupBox9.Location = new Point(4, 26);
groupBox9.Name = "groupBox9"; groupBox9.Name = "groupBox9";
groupBox9.Size = new Size(1161, 98); groupBox9.Size = new Size(1161, 98);
groupBox9.TabIndex = 161; groupBox9.TabIndex = 149;
groupBox9.TabStop = false; groupBox9.TabStop = false;
groupBox9.Text = "站控发送指令"; groupBox9.Text = "站控发送指令";
// //
// groupBox3 // groupBox3
// //
groupBox3.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; groupBox3.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
groupBox3.Controls.Add(lstBoxConnect);
groupBox3.Controls.Add(label3); groupBox3.Controls.Add(label3);
groupBox3.Controls.Add(txtDestAddr); groupBox3.Controls.Add(txtDestAddr);
groupBox3.Controls.Add(label2); groupBox3.Controls.Add(label2);
@ -485,15 +495,26 @@ partial class Form1
groupBox3.Margin = new Padding(5); groupBox3.Margin = new Padding(5);
groupBox3.Name = "groupBox3"; groupBox3.Name = "groupBox3";
groupBox3.Padding = new Padding(5); groupBox3.Padding = new Padding(5);
groupBox3.Size = new Size(685, 63); groupBox3.Size = new Size(1041, 63);
groupBox3.TabIndex = 80; groupBox3.TabIndex = 80;
groupBox3.TabStop = false; groupBox3.TabStop = false;
groupBox3.Text = "充电机连接"; groupBox3.Text = "充电机连接";
// //
// lstBoxConnect
//
lstBoxConnect.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
lstBoxConnect.FormattingEnabled = true;
lstBoxConnect.ItemHeight = 20;
lstBoxConnect.Location = new Point(707, 24);
lstBoxConnect.Margin = new Padding(5);
lstBoxConnect.Name = "lstBoxConnect";
lstBoxConnect.Size = new Size(324, 24);
lstBoxConnect.TabIndex = 71;
//
// label3 // label3
// //
label3.AutoSize = true; label3.AutoSize = true;
label3.Location = new Point(152, 35); label3.Location = new Point(150, 33);
label3.Name = "label3"; label3.Name = "label3";
label3.Size = new Size(94, 20); label3.Size = new Size(94, 20);
label3.TabIndex = 20; label3.TabIndex = 20;
@ -510,7 +531,7 @@ partial class Form1
// label2 // label2
// //
label2.AutoSize = true; label2.AutoSize = true;
label2.Location = new Point(15, 33); label2.Location = new Point(13, 31);
label2.Name = "label2"; label2.Name = "label2";
label2.Size = new Size(55, 20); label2.Size = new Size(55, 20);
label2.TabIndex = 18; label2.TabIndex = 18;
@ -533,6 +554,7 @@ partial class Form1
BtnCloseConnect.TabIndex = 14; BtnCloseConnect.TabIndex = 14;
BtnCloseConnect.Text = "关闭服务"; BtnCloseConnect.Text = "关闭服务";
BtnCloseConnect.UseVisualStyleBackColor = true; BtnCloseConnect.UseVisualStyleBackColor = true;
BtnCloseConnect.Click += BtnCloseConnect_Click;
// //
// BtnChrg01Connect // BtnChrg01Connect
// //
@ -545,16 +567,28 @@ partial class Form1
BtnChrg01Connect.UseVisualStyleBackColor = true; BtnChrg01Connect.UseVisualStyleBackColor = true;
BtnChrg01Connect.Click += BtnChrg01Connect_Click; BtnChrg01Connect.Click += BtnChrg01Connect_Click;
// //
// groupBox1
//
groupBox1.Font = new Font("微软雅黑", 9F, FontStyle.Regular, GraphicsUnit.Point);
groupBox1.Location = new Point(879, 33);
groupBox1.Margin = new Padding(5);
groupBox1.Name = "groupBox1";
groupBox1.Padding = new Padding(5);
groupBox1.Size = new Size(274, 57);
groupBox1.TabIndex = 79;
groupBox1.TabStop = false;
groupBox1.Text = "充电机连接状态";
//
// groupBox5 // groupBox5
// //
groupBox5.Controls.Add(lstSendFrameInfo); groupBox5.Controls.Add(lstSendFrameInfo);
groupBox5.Font = new Font("微软雅黑", 9F, FontStyle.Regular, GraphicsUnit.Point); groupBox5.Font = new Font("微软雅黑", 9F, FontStyle.Regular, GraphicsUnit.Point);
groupBox5.Location = new Point(12, 500); groupBox5.Location = new Point(2, 491);
groupBox5.Margin = new Padding(5); groupBox5.Margin = new Padding(5);
groupBox5.Name = "groupBox5"; groupBox5.Name = "groupBox5";
groupBox5.Padding = new Padding(5); groupBox5.Padding = new Padding(5);
groupBox5.Size = new Size(1154, 172); groupBox5.Size = new Size(1154, 172);
groupBox5.TabIndex = 159; groupBox5.TabIndex = 147;
groupBox5.TabStop = false; groupBox5.TabStop = false;
groupBox5.Text = "发送数据帧信息"; groupBox5.Text = "发送数据帧信息";
// //
@ -563,10 +597,10 @@ partial class Form1
lstSendFrameInfo.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right; lstSendFrameInfo.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
lstSendFrameInfo.FormattingEnabled = true; lstSendFrameInfo.FormattingEnabled = true;
lstSendFrameInfo.ItemHeight = 20; lstSendFrameInfo.ItemHeight = 20;
lstSendFrameInfo.Location = new Point(16, 32); lstSendFrameInfo.Location = new Point(14, 30);
lstSendFrameInfo.Margin = new Padding(5); lstSendFrameInfo.Margin = new Padding(5);
lstSendFrameInfo.Name = "lstSendFrameInfo"; lstSendFrameInfo.Name = "lstSendFrameInfo";
lstSendFrameInfo.Size = new Size(1113, 124); lstSendFrameInfo.Size = new Size(1115, 124);
lstSendFrameInfo.TabIndex = 73; lstSendFrameInfo.TabIndex = 73;
// //
// groupBox8 // groupBox8
@ -575,10 +609,10 @@ partial class Form1
groupBox8.Controls.Add(btnCmd3); groupBox8.Controls.Add(btnCmd3);
groupBox8.Controls.Add(btnCmd1); groupBox8.Controls.Add(btnCmd1);
groupBox8.Controls.Add(btnCmd5); groupBox8.Controls.Add(btnCmd5);
groupBox8.Location = new Point(15, 139); groupBox8.Location = new Point(5, 130);
groupBox8.Name = "groupBox8"; groupBox8.Name = "groupBox8";
groupBox8.Size = new Size(555, 70); groupBox8.Size = new Size(555, 70);
groupBox8.TabIndex = 160; groupBox8.TabIndex = 148;
groupBox8.TabStop = false; groupBox8.TabStop = false;
groupBox8.Text = "设置/查询工作参数和命令"; groupBox8.Text = "设置/查询工作参数和命令";
// //
@ -628,6 +662,19 @@ partial class Form1
btnCmd5.UseVisualStyleBackColor = true; btnCmd5.UseVisualStyleBackColor = true;
btnCmd5.Click += btnCmd5_Click; btnCmd5.Click += btnCmd5_Click;
// //
// groupBox2
//
groupBox2.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left;
groupBox2.Font = new Font("微软雅黑", 9F, FontStyle.Regular, GraphicsUnit.Point);
groupBox2.Location = new Point(2, 767);
groupBox2.Margin = new Padding(5);
groupBox2.Name = "groupBox2";
groupBox2.Padding = new Padding(5);
groupBox2.Size = new Size(1545, 0);
groupBox2.TabIndex = 146;
groupBox2.TabStop = false;
groupBox2.Text = "接收数据帧信息";
//
// Form1 // Form1
// //
AutoScaleDimensions = new SizeF(9F, 20F); AutoScaleDimensions = new SizeF(9F, 20F);
@ -645,11 +692,12 @@ partial class Form1
Controls.Add(groupBox9); Controls.Add(groupBox9);
Controls.Add(groupBox5); Controls.Add(groupBox5);
Controls.Add(groupBox8); Controls.Add(groupBox8);
Controls.Add(groupBox2);
Controls.Add(button1); Controls.Add(button1);
Margin = new Padding(2, 1, 2, 1); Margin = new Padding(2, 1, 2, 1);
Name = "Form1"; Name = "Form1";
Text = "Form1"; Text = "换电平台";
Load += Form1_Load; Load += FrmChargeResult_Load;
groupBox10.ResumeLayout(false); groupBox10.ResumeLayout(false);
groupBox16.ResumeLayout(false); groupBox16.ResumeLayout(false);
groupBox15.ResumeLayout(false); groupBox15.ResumeLayout(false);
@ -666,6 +714,7 @@ partial class Form1
ResumeLayout(false); ResumeLayout(false);
} }
#endregion #endregion
private Button button1; private Button button1;
@ -711,6 +760,8 @@ partial class Form1
private TextBox txtChargePort; private TextBox txtChargePort;
private Button BtnCloseConnect; private Button BtnCloseConnect;
private Button BtnChrg01Connect; private Button BtnChrg01Connect;
private GroupBox groupBox1;
private ListBox lstBoxConnect;
private GroupBox groupBox5; private GroupBox groupBox5;
private ListBox lstSendFrameInfo; private ListBox lstSendFrameInfo;
private GroupBox groupBox8; private GroupBox groupBox8;
@ -718,4 +769,5 @@ partial class Form1
private Button btnCmd3; private Button btnCmd3;
private Button btnCmd1; private Button btnCmd1;
private Button btnCmd5; private Button btnCmd5;
private GroupBox groupBox2;
} }

@ -1,40 +1,48 @@
using Autofac;
using HybirdFrameworkEntity; using HybirdFrameworkEntity;
using HybirdFrameworkServices.Netty; using HybirdFrameworkServices.Netty;
using HybirdFrameworkServices.System; using HybirdFrameworkServices.System;
using log4net; using log4net;
namespace WinFormStarter; namespace WinFormStarter;
public partial class Form1 : Form public partial class Form1 : Form
{ {
private ILog _log = LogManager.GetLogger(typeof(Form1)); private ILog _log = LogManager.GetLogger(typeof(Form1));
private SysUserServices _sysUserServices; private SysUserServices _sysUserServices;
Encode encode = new Encode(); Encode encode = new Encode();
private Server server; private Server Server;
public Form1(SysUserServices sysUserServices) public Form1(SysUserServices sysUserServices)
{ {
_sysUserServices = sysUserServices; _sysUserServices = sysUserServices;
InitializeComponent(); InitializeComponent();
} }
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
_log.Info("this is a test"); //_log.Info("this is a test");
MessageBox.Show(_sysUserServices.Query().Count.ToString()); //MessageBox.Show(_sysUserServices.Query().Count.ToString());
} }
private void Form1_Load(object sender, EventArgs e) private void FrmChargeResult_Load(object sender, EventArgs e)
{ {
//TcpClientChargerTool tcpClientChargerTool = new TcpClientChargerTool();
//tcpClientChargerTool.F_ClientIP = "127.0.0.1";
//tcpClientChargerTool.F_ClientPort = 9000;
//tcpClientChargerTool.Connect();
} }
private void BtnChrg01Connect_Click(object sender, EventArgs e) private void BtnChrg01Connect_Click(object sender, EventArgs e)
{ {
int port = Convert.ToInt32(txtChargePort.Text); int port = Convert.ToInt32(txtChargePort.Text);
server = new Server(port); Server = new Server(port);
} }
#region #region
private void btnCmd1_Click(object sender, EventArgs e) private void btnCmd1_Click(object sender, EventArgs e)
{ {
@ -52,7 +60,7 @@ public partial class Form1 : Form
setData[7] = 7; setData[7] = 7;
byte[] bytes = encode.Send1(type, startAddress, num, setData); byte[] bytes = encode.Send1(type, startAddress, num, setData);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -73,7 +81,7 @@ public partial class Form1 : Form
setData[7] = 7; setData[7] = 7;
byte[] bytes = encode.Send3(type, startAddress, setData); byte[] bytes = encode.Send3(type, startAddress, setData);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -95,7 +103,7 @@ public partial class Form1 : Form
setData[7] = 7; setData[7] = 7;
byte[] bytes = encode.Send5(type, startAddress, num, setData); byte[] bytes = encode.Send5(type, startAddress, num, setData);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -122,7 +130,7 @@ public partial class Form1 : Form
CMD.DisOrChargeMark = 13; CMD.DisOrChargeMark = 13;
byte[] bytes = encode.Send7(CMD); byte[] bytes = encode.Send7(CMD);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -134,7 +142,7 @@ public partial class Form1 : Form
byte sign = 0; byte sign = 0;
byte[] bytes = encode.Send113(chargeNum, sign); byte[] bytes = encode.Send113(chargeNum, sign);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -146,7 +154,7 @@ public partial class Form1 : Form
uint func = 0; uint func = 0;
byte[] bytes = encode.Send201(CMD, func); byte[] bytes = encode.Send201(CMD, func);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -157,7 +165,7 @@ public partial class Form1 : Form
string fileName = ""; string fileName = "";
byte[] bytes = encode.Send1003(fileName); byte[] bytes = encode.Send1003(fileName);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -168,7 +176,7 @@ public partial class Form1 : Form
uint fileLength = 0; uint fileLength = 0;
byte[] bytes = encode.Send1005(fileLength); byte[] bytes = encode.Send1005(fileLength);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -179,7 +187,7 @@ public partial class Form1 : Form
string updata = ""; string updata = "";
byte[] bytes = encode.Send1007(updata); byte[] bytes = encode.Send1007(updata);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -190,7 +198,7 @@ public partial class Form1 : Form
uint Reserved1 = 0; uint Reserved1 = 0;
byte[] bytes = encode.Send1009(Reserved1); byte[] bytes = encode.Send1009(Reserved1);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -201,7 +209,7 @@ public partial class Form1 : Form
uint Reserved1 = 0; uint Reserved1 = 0;
byte[] bytes = encode.Send1011(Reserved1); byte[] bytes = encode.Send1011(Reserved1);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -213,7 +221,7 @@ public partial class Form1 : Form
string description = ""; string description = "";
byte[] bytes = encode.Send1021(results, description); byte[] bytes = encode.Send1021(results, description);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -225,7 +233,7 @@ public partial class Form1 : Form
uint startIndex = 0; uint startIndex = 0;
byte[] bytes = encode.Send401(chargingSerialNum, startIndex); byte[] bytes = encode.Send401(chargingSerialNum, startIndex);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -245,7 +253,7 @@ public partial class Form1 : Form
{ {
byte[] bytes = encode.Send1101(); byte[] bytes = encode.Send1101();
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -256,7 +264,7 @@ public partial class Form1 : Form
CMD1103 CMD = new CMD1103(); CMD1103 CMD = new CMD1103();
byte[] bytes = encode.Send1103(CMD); byte[] bytes = encode.Send1103(CMD);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -267,7 +275,7 @@ public partial class Form1 : Form
CMD1105 CMD = new CMD1105(); CMD1105 CMD = new CMD1105();
byte[] bytes = encode.Send1105(CMD); byte[] bytes = encode.Send1105(CMD);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -277,7 +285,7 @@ public partial class Form1 : Form
{ {
byte[] bytes = encode.Send1107(); byte[] bytes = encode.Send1107();
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -288,7 +296,7 @@ public partial class Form1 : Form
CMD1301 CMD = new CMD1301(); CMD1301 CMD = new CMD1301();
byte[] bytes = encode.Send1301(CMD); byte[] bytes = encode.Send1301(CMD);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -299,7 +307,7 @@ public partial class Form1 : Form
CMD1401 CMD = new CMD1401(); CMD1401 CMD = new CMD1401();
byte[] bytes = encode.Send1401(CMD); byte[] bytes = encode.Send1401(CMD);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -310,7 +318,7 @@ public partial class Form1 : Form
CMD1406 CMD = new CMD1406(); CMD1406 CMD = new CMD1406();
byte[] bytes = encode.Send1406(CMD); byte[] bytes = encode.Send1406(CMD);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -323,7 +331,7 @@ public partial class Form1 : Form
uint value04 = 0; uint value04 = 0;
byte[] bytes = encode.Send205(value03, value04); byte[] bytes = encode.Send205(value03, value04);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -335,7 +343,7 @@ public partial class Form1 : Form
string value05 = ";"; string value05 = ";";
byte[] bytes = encode.Send209(CMD210, value05); byte[] bytes = encode.Send209(CMD210, value05);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -346,7 +354,7 @@ public partial class Form1 : Form
CMD203 CMD = new CMD203(); CMD203 CMD = new CMD203();
byte[] bytes = encode.Send203(CMD); byte[] bytes = encode.Send203(CMD);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -363,7 +371,7 @@ public partial class Form1 : Form
ulong value11 = 0; ulong value11 = 0;
byte[] bytes = encode.Send207(CMD208, value06, value07, value08, value09, value10, value11); byte[] bytes = encode.Send207(CMD208, value06, value07, value08, value09, value10, value11);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -374,7 +382,7 @@ public partial class Form1 : Form
uint instruct = 0; uint instruct = 0;
byte[] bytes = encode.Send1001(instruct); byte[] bytes = encode.Send1001(instruct);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -384,7 +392,7 @@ public partial class Form1 : Form
{ {
byte[] bytes = encode.Send301(); byte[] bytes = encode.Send301();
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -394,7 +402,7 @@ public partial class Form1 : Form
{ {
byte[] bytes = encode.Send303(); byte[] bytes = encode.Send303();
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
@ -406,9 +414,14 @@ public partial class Form1 : Form
uint value05 = 0; uint value05 = 0;
byte[] bytes = encode.Send221(CMD221, value05); byte[] bytes = encode.Send221(CMD221, value05);
if (server != null) if (Server != null)
{ {
Server.Send(bytes); Server.Send(bytes);
} }
} }
private void BtnCloseConnect_Click(object sender, EventArgs e)
{
Server.Dispose();
}
} }

@ -1,10 +1,11 @@
using Autofac; using Autofac;
using HybirdFrameworkCore.Autofac; using HybirdFrameworkCore.Autofac;
using HybirdFrameworkCore.Configuration; using HybirdFrameworkCore.Configuration;
using HybirdFrameworkServices.System;
using log4net.Config;
using SqlSugar; using SqlSugar;
using SqlSugar.IOC; using SqlSugar.IOC;
namespace WinFormStarter namespace WinFormStarter
{ {
} }
@ -23,7 +24,7 @@ static class Program
// To customize application configuration such as set high DPI settings or default font, // To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration. // see https://aka.ms/applicationconfiguration.
ApplicationConfiguration.Initialize(); ApplicationConfiguration.Initialize();
log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"\log4net.xml")); XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + @"\log4net.xml"));
Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException); Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
// 创建容器 // 创建容器
var builder = new ContainerBuilder(); var builder = new ContainerBuilder();
@ -49,6 +50,7 @@ static class Program
builder.RegisterModule(new AutofacModuleRegister()); builder.RegisterModule(new AutofacModuleRegister());
// 构建容器 // 构建容器
Container = builder.Build(); Container = builder.Build();
AppInfo.Container = Container;
Application.Run(Container.ResolveNamed<Form>("Form1")); Application.Run(Container.ResolveNamed<Form>("Form1"));
} }

@ -1,18 +0,0 @@
{
"ConnectionStrings": {
"DbType": "MySql", //SqlServer,MySql
"SqlConnection": "server=106.12.36.89;Port=3306;Database=test;Uid=remote_user;Pwd=Rszn123;Charset=utf8;"
},
"Update": {
"AutoUpdate": "false",
"Version": "1.1.0.1",
"Url": "http://121.4.95.243:8090/Updates/AutoUpdaterStarter.xml"//
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
}
}

@ -3,3 +3,162 @@
2024-04-02 17:01:47,738 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502 2024-04-02 17:01:47,738 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 17:02:01,954 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x2c2f33c6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502] 2024-04-02 17:02:01,954 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x2c2f33c6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 17:02:01,957 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x2c2f33c6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502] 2024-04-02 17:02:01,957 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x2c2f33c6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 17:52:14,400 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 17:52:14,655 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 17:52:15,121 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x27d66690, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 17:52:15,124 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x27d66690, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:06:47,540 INFO 1 WinFormStarter.Form1 - this is a test
2024-04-02 18:08:42,932 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:08:43,128 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 18:08:43,437 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x5885de02, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:08:43,439 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x5885de02, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:08:49,955 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - exception [id: 0x5885de02, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:08:49,971 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - inactive [id: 0x5885de02, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:08:49,972 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x5885de02, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:08:50,865 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x0aecce6c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:08:50,866 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x0aecce6c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:15:54,305 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:15:54,513 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 18:15:54,960 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x1c85a41c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:15:54,962 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x1c85a41c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:17:12,021 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:17:12,248 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 18:17:12,416 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x5acb1abb, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:17:12,418 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x5acb1abb, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:17:13,421 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - exception [id: 0x5acb1abb, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:17:13,430 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - inactive [id: 0x5acb1abb, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:17:13,432 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x5acb1abb, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:17:13,998 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x747d53f1, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:17:13,998 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x747d53f1, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:21:49,499 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:21:49,735 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 18:21:49,932 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x500cc6c7, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:21:49,934 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x500cc6c7, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:21:51,374 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - exception [id: 0x500cc6c7, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:21:51,383 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - inactive [id: 0x500cc6c7, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:21:51,385 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x500cc6c7, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:21:51,950 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x5bdfba93, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:21:51,951 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x5bdfba93, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:22:43,732 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:22:43,927 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 18:22:44,488 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x73e2ed09, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:22:44,490 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x73e2ed09, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:22:44,997 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - exception [id: 0x73e2ed09, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:22:45,005 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - inactive [id: 0x73e2ed09, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:22:45,007 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x73e2ed09, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:22:45,494 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x19164d8c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:22:45,494 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x19164d8c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:26:37,588 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:26:37,818 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 18:26:39,461 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x3685d19c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:26:39,463 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x3685d19c, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 18:27:27,808 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - exception [id: 0x3685d19c, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:27:27,821 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - inactive [id: 0x3685d19c, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:27:27,828 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x3685d19c, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 18:28:13,136 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x1490c563, [::ffff:127.0.0.1]:60454 => [::ffff:127.0.0.1]:502]
2024-04-02 18:28:13,137 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x1490c563, [::ffff:127.0.0.1]:60454 => [::ffff:127.0.0.1]:502]
2024-04-02 18:29:15,435 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:29:15,675 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 9000
2024-04-02 18:29:20,679 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x60a3aa03, [::ffff:127.0.0.1]:60505 => [::ffff:127.0.0.1]:9000]
2024-04-02 18:29:20,682 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x60a3aa03, [::ffff:127.0.0.1]:60505 => [::ffff:127.0.0.1]:9000]
2024-04-02 18:43:21,740 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:43:21,967 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 9000
2024-04-02 18:43:26,320 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x39afa72d, [::ffff:127.0.0.1]:61072 => [::ffff:127.0.0.1]:9000]
2024-04-02 18:43:26,323 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x39afa72d, [::ffff:127.0.0.1]:61072 => [::ffff:127.0.0.1]:9000]
2024-04-02 18:53:45,834 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 18:53:46,054 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 18:53:58,086 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x0f2eeca3, [::ffff:127.0.0.1]:61475 => [::ffff:127.0.0.1]:502]
2024-04-02 18:53:58,088 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x0f2eeca3, [::ffff:127.0.0.1]:61475 => [::ffff:127.0.0.1]:502]
2024-04-02 19:01:54,043 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:01:54,282 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:02:10,189 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x507e5cc5, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:02:10,193 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x507e5cc5, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:06:14,766 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:06:15,001 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:06:15,217 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x08b1ab7d, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:06:15,219 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x08b1ab7d, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:06:19,731 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x08b1ab7d, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 19:06:20,183 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x620f124d, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:06:20,184 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x620f124d, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:06:31,648 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x620f124d, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 19:06:32,173 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x590ccb44, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:06:32,174 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x590ccb44, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:14:13,282 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x590ccb44, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 19:14:14,219 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x73b78f62, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:14:14,220 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x73b78f62, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:13,446 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:38:13,750 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:38:14,582 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x135bd359, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:14,586 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x135bd359, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:17,052 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x30b4f5a0, [::ffff:127.0.0.1]:62829 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:17,053 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x30b4f5a0, [::ffff:127.0.0.1]:62829 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:28,921 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:38:29,159 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:38:29,511 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x1a6692ae, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:29,514 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x1a6692ae, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:30,993 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x5d2ae713, [::ffff:127.0.0.1]:62836 => [::ffff:127.0.0.1]:502]
2024-04-02 19:38:30,993 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x5d2ae713, [::ffff:127.0.0.1]:62836 => [::ffff:127.0.0.1]:502]
2024-04-02 19:39:04,058 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:39:04,292 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:39:04,613 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x2657d5e5, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:39:04,615 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x2657d5e5, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:39:07,972 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x43c3dcb4, [::ffff:127.0.0.1]:62852 => [::ffff:127.0.0.1]:502]
2024-04-02 19:39:07,973 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x43c3dcb4, [::ffff:127.0.0.1]:62852 => [::ffff:127.0.0.1]:502]
2024-04-02 19:39:48,055 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x167b8ee9, [::ffff:127.0.0.1]:62879 => [::ffff:127.0.0.1]:502]
2024-04-02 19:39:48,058 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x167b8ee9, [::ffff:127.0.0.1]:62879 => [::ffff:127.0.0.1]:502]
2024-04-02 19:40:56,101 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:40:56,426 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:40:56,686 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x7be68b77, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:40:56,690 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x7be68b77, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:40:58,780 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x3ba37c5c, [::ffff:127.0.0.1]:62918 => [::ffff:127.0.0.1]:502]
2024-04-02 19:40:58,781 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x3ba37c5c, [::ffff:127.0.0.1]:62918 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:30,508 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:41:30,788 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:41:31,599 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x488601f3, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:31,601 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x488601f3, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:32,259 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x79cd522d, [::ffff:127.0.0.1]:62935 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:32,259 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x79cd522d, [::ffff:127.0.0.1]:62935 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:52,020 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:41:52,330 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:41:52,548 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x5310450f, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:52,551 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x5310450f, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:54,140 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x78c7e5d2, [::ffff:127.0.0.1]:62950 => [::ffff:127.0.0.1]:502]
2024-04-02 19:41:54,141 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x78c7e5d2, [::ffff:127.0.0.1]:62950 => [::ffff:127.0.0.1]:502]
2024-04-02 19:44:50,791 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:44:51,085 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:44:51,619 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x532eea20, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:44:51,622 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x532eea20, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:44:52,604 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x107896a2, [::ffff:127.0.0.1]:63050 => [::ffff:127.0.0.1]:502]
2024-04-02 19:44:52,605 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x107896a2, [::ffff:127.0.0.1]:63050 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:34,429 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:49:34,616 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:49:35,101 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x137fa289, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:35,103 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x137fa289, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:36,559 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x2897ffc9, [::ffff:127.0.0.1]:63231 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:36,560 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x2897ffc9, [::ffff:127.0.0.1]:63231 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:37,696 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - inactive [id: 0x137fa289, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 19:49:37,696 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - inactive [id: 0x2897ffc9, [::ffff:127.0.0.1]:63231 :> [::ffff:127.0.0.1]:502]
2024-04-02 19:49:37,699 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x137fa289, [::ffff:127.0.0.1]:1000 :> [::ffff:127.0.0.1]:502]
2024-04-02 19:49:37,699 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - unregister [id: 0x2897ffc9, [::ffff:127.0.0.1]:63231 :> [::ffff:127.0.0.1]:502]
2024-04-02 19:49:38,469 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x716d6c91, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:38,470 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x716d6c91, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:42,703 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x7cd3da5d, [::ffff:127.0.0.1]:63233 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:42,704 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x7cd3da5d, [::ffff:127.0.0.1]:63233 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:54,166 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:49:54,349 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:49:54,563 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x703216e6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:54,565 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x703216e6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:59,567 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x2128c1f9, [::ffff:127.0.0.1]:63246 => [::ffff:127.0.0.1]:502]
2024-04-02 19:49:59,568 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x2128c1f9, [::ffff:127.0.0.1]:63246 => [::ffff:127.0.0.1]:502]
2024-04-02 19:53:47,596 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-02 19:53:47,785 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-02 19:53:48,044 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x313e7608, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:53:48,046 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x313e7608, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-02 19:53:55,091 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x3283aaad, [::ffff:127.0.0.1]:63377 => [::ffff:127.0.0.1]:502]
2024-04-02 19:53:55,092 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x3283aaad, [::ffff:127.0.0.1]:63377 => [::ffff:127.0.0.1]:502]
2024-04-03 09:34:38,108 INFO 1 HybirdFrameworkServices.Netty.Server - Start Listen
2024-04-03 09:34:38,364 INFO 1 HybirdFrameworkServices.Netty.Server - netty success listen 502
2024-04-03 09:34:38,977 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x2c9786a6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-03 09:34:38,980 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x2c9786a6, [::ffff:127.0.0.1]:1000 => [::ffff:127.0.0.1]:502]
2024-04-03 09:34:40,672 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - register [id: 0x54f27686, [::ffff:127.0.0.1]:52003 => [::ffff:127.0.0.1]:502]
2024-04-03 09:34:40,673 INFO SingleThreadEventExecutor worker HybirdFrameworkServices.Netty.ServerListenerHandler - active [id: 0x54f27686, [::ffff:127.0.0.1]:52003 => [::ffff:127.0.0.1]:502]

Loading…
Cancel
Save