DotNetty icon indicating copy to clipboard operation
DotNetty copied to clipboard

ICoderBuilder modifies support for any codec

Open CrazyJson opened this issue 5 years ago • 2 comments

It is recommended to modify the ICoderBuilder interface statement to support any codec.The current interface statement only supports fixed-length codecs, so I can't do it if I want to separate codecs with characters, for example

CrazyJson avatar Jul 30 '20 04:07 CrazyJson

/// <summary> /// 包含编码器和解码器的构建者 /// </summary> /// <typeparam name="TBuilder">特定构建者</typeparam> public interface ICoderBuilder<TBuilder> { /// <summary> /// 添加编解码器 /// </summary> /// <param name="channelHandlers">编解码器</param> /// <returns>TBuilder</returns> TBuilder AddChannelHandler(IChannelHandler[] channelHandlers); }

CrazyJson avatar Jul 30 '20 04:07 CrazyJson

image tcpSocketClient = await SocketBuilderFactory.GetTcpSocketClientBuilder(connectInfo.IP, connectInfo.Port) .AddChannelHandler(GetChannelHandlers())

CrazyJson avatar Jul 30 '20 04:07 CrazyJson