ICoderBuilder modifies support for any codec
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
/// <summary> /// 包含编码器和解码器的构建者 /// </summary> /// <typeparam name="TBuilder">特定构建者</typeparam> public interface ICoderBuilder<TBuilder> { /// <summary> /// 添加编解码器 /// </summary> /// <param name="channelHandlers">编解码器</param> /// <returns>TBuilder</returns> TBuilder AddChannelHandler(IChannelHandler[] channelHandlers); }
tcpSocketClient = await SocketBuilderFactory.GetTcpSocketClientBuilder(connectInfo.IP, connectInfo.Port) .AddChannelHandler(GetChannelHandlers())