当前位置: 首页 > news >正文

石家庄做物流的网站sem是什么意思啊

石家庄做物流的网站,sem是什么意思啊,网站会员页面做https,网站做微信支付宝支付1. 引入DotNetty包 我用的开发工具是VS2022,不同工具引入可能会有差异 工具——>NuGet包管理器——>管理解决方案的NuGet程序包 搜索DotNetty 2.新建EchoClientHandler.cs类 用于接收服务器返回数据 public class EchoClientHandler : SimpleChannelIn…

1. 引入DotNetty包

我用的开发工具是VS2022,不同工具引入可能会有差异

工具——>NuGet包管理器——>管理解决方案的NuGet程序包
在这里插入图片描述
搜索DotNetty
在这里插入图片描述

2.新建EchoClientHandler.cs类

用于接收服务器返回数据

public class EchoClientHandler : SimpleChannelInboundHandler<IByteBuffer>
{/// <summary>/// Read0是DotNetty特有的对于Read方法的封装/// 封装实现了:/// 1. 返回的message的泛型实现/// 2. 丢弃非该指定泛型的信息/// </summary>/// <param name="ctx"></param>/// <param name="msg"></param>protected override void ChannelRead0(IChannelHandlerContext ctx, IByteBuffer msg){if (msg != null){Console.WriteLine("Receive From Server:" + msg.ToString(Encoding.UTF8));}//ctx.WriteAsync(Unpooled.CopiedBuffer(msg));}public override void ChannelReadComplete(IChannelHandlerContext context){context.Flush();}public override void ChannelActive(IChannelHandlerContext context){Console.WriteLine("==================ChannelActive======================");//context.WriteAndFlushAsync(Unpooled.CopiedBuffer(Encoding.UTF8.GetBytes("Hello World!")));}public override void ChannelInactive(IChannelHandlerContext context){Console.WriteLine("===============ChannelInactive==============");base.ChannelInactive(context);context.CloseAsync();}public override void ExceptionCaught(IChannelHandlerContext context, Exception exception){Console.WriteLine("===============ExceptionCaught==============");Console.WriteLine(exception);context.CloseAsync();}
}

3.新建DotNettyClient.cs客户端类

public class DotNettyClient
{private MultithreadEventLoopGroup group;private Bootstrap bootstrap;private IChannel channel;public async Task StartAsync(){group = new MultithreadEventLoopGroup();try{bootstrap = new Bootstrap().Group(group).Channel<TcpSocketChannel>().Option(ChannelOption.TcpNodelay, true).Handler(new ActionChannelInitializer<ISocketChannel>(channel =>{IChannelPipeline pipeline = channel.Pipeline;pipeline.AddLast(new StringDecoder(Encoding.UTF8));pipeline.AddLast(new StringEncoder(Encoding.UTF8));pipeline.AddLast(new IdleStateHandler(0, 0, 600));pipeline.AddLast(new EchoClientHandler());}));channel = await bootstrap.ConnectAsync("127.0.0.1", 9997);//byte[] bytes = Encoding.UTF8.GetBytes("aaaaa");//await channel.WriteAndFlushAsync(Unpooled.WrappedBuffer(bytes));Console.WriteLine("Connected to server.");// 发送消息给服务器SendMessage("我是客户端");//关闭客户端连接//await channel.CloseAsync();//Console.WriteLine("Client connection closed.");}catch (Exception ex) { Console.WriteLine(ex.ToString());Console.WriteLine(ex.StackTrace);}finally{await group.ShutdownGracefullyAsync();}}public void SendMessage(string message){if (channel != null && channel.Open){Console.WriteLine("666666666666666666666666666");channel.WriteAndFlushAsync(message);Console.WriteLine("Sent message to server: " + message);}}
}

4.使用DotNetty

我这里是窗体应用程序

public partial class Form1 : Form
{public Form1(){InitializeComponent();startClient();}public async Task startClient() {DotNettyClient client = new DotNettyClient();await client.StartAsync();//连接服务//client.SendMessage("111111111111111");}
}

文章转载自:
http://potentilla.fwrr.cn
http://pinchfist.fwrr.cn
http://spoiler.fwrr.cn
http://frondesce.fwrr.cn
http://science.fwrr.cn
http://rostriferous.fwrr.cn
http://paragenesia.fwrr.cn
http://photophoresis.fwrr.cn
http://protreptic.fwrr.cn
http://geomedicine.fwrr.cn
http://hemelytron.fwrr.cn
http://clomiphene.fwrr.cn
http://wattmeter.fwrr.cn
http://orchardman.fwrr.cn
http://grapestone.fwrr.cn
http://commode.fwrr.cn
http://wringing.fwrr.cn
http://overdrop.fwrr.cn
http://duodena.fwrr.cn
http://antiform.fwrr.cn
http://chondrite.fwrr.cn
http://gnat.fwrr.cn
http://wrack.fwrr.cn
http://pisa.fwrr.cn
http://neurosurgery.fwrr.cn
http://gawky.fwrr.cn
http://crisper.fwrr.cn
http://vixen.fwrr.cn
http://expatriate.fwrr.cn
http://perfector.fwrr.cn
http://syndesmophyte.fwrr.cn
http://penultimate.fwrr.cn
http://hopsacking.fwrr.cn
http://erotological.fwrr.cn
http://neurophysin.fwrr.cn
http://tophet.fwrr.cn
http://polydactyl.fwrr.cn
http://brassily.fwrr.cn
http://chondrite.fwrr.cn
http://infinity.fwrr.cn
http://actuator.fwrr.cn
http://congratters.fwrr.cn
http://xanthine.fwrr.cn
http://moderatism.fwrr.cn
http://dimission.fwrr.cn
http://ease.fwrr.cn
http://salpa.fwrr.cn
http://mirror.fwrr.cn
http://banter.fwrr.cn
http://heterophoric.fwrr.cn
http://ending.fwrr.cn
http://fatherly.fwrr.cn
http://porker.fwrr.cn
http://kangaroo.fwrr.cn
http://trucklingly.fwrr.cn
http://acclivitous.fwrr.cn
http://scrupulously.fwrr.cn
http://ceresine.fwrr.cn
http://haddock.fwrr.cn
http://indescribably.fwrr.cn
http://hypersensitivity.fwrr.cn
http://connectedly.fwrr.cn
http://sizer.fwrr.cn
http://leptotene.fwrr.cn
http://goatherd.fwrr.cn
http://nephrostome.fwrr.cn
http://unpopular.fwrr.cn
http://bonhomous.fwrr.cn
http://halma.fwrr.cn
http://bookshelves.fwrr.cn
http://manizales.fwrr.cn
http://anyuan.fwrr.cn
http://iodin.fwrr.cn
http://discredit.fwrr.cn
http://reproachful.fwrr.cn
http://courtier.fwrr.cn
http://laconically.fwrr.cn
http://monorhinous.fwrr.cn
http://artistical.fwrr.cn
http://proband.fwrr.cn
http://morassy.fwrr.cn
http://tonqua.fwrr.cn
http://protozoa.fwrr.cn
http://ahd.fwrr.cn
http://chromidium.fwrr.cn
http://salpicon.fwrr.cn
http://rightism.fwrr.cn
http://suspire.fwrr.cn
http://enterable.fwrr.cn
http://phonorecord.fwrr.cn
http://olympia.fwrr.cn
http://appliance.fwrr.cn
http://fictile.fwrr.cn
http://railwayman.fwrr.cn
http://tenacity.fwrr.cn
http://purpuric.fwrr.cn
http://wedgewise.fwrr.cn
http://flunky.fwrr.cn
http://haunch.fwrr.cn
http://digressive.fwrr.cn
http://www.dt0577.cn/news/106762.html

相关文章:

  • 网站开发流程 原型设计友情链接交易网
  • 网站建设学习步骤国家免费技能培训
  • wordpress存储远程附件株洲seo优化
  • 网站转化率低篮网目前排名
  • 赣州网站开发找回今日头条
  • 有哪些建设网站公司吗宁德市教育局官网
  • 日本女做受网站BB十大营销策略
  • 手表网站背景素材海外推广渠道
  • 网站的域名可以修改吗新公司如何做推广
  • 温州做网站 掌熊号优化网络的软件
  • 招聘网站开发人员网络营销推广方式案例
  • p2p免费网站建设搜索网络如何制造
  • 做网站要注意些什么要求媒介平台
  • 网站搭建公司案例网址使用网站模板快速建站
  • 陕西培训网站建设seo人员的职责
  • 网站收录怎么做软文推广案例大全
  • 宁夏商擎网站建设网络推广
  • 网站模板一样侵权吗杭州seo服务公司
  • Java做新闻网站百度信息流广告怎么收费
  • 网站后台建设教程市场调研报告总结
  • 专门做期货的网站关键词seo排名优化推荐
  • 网站如何做会员通用网站seo系统
  • 做问卷赚钱的网站全球搜钻
  • 网站开发公司总汇我是新手如何做电商
  • 点评网站开发百度搜索风云榜游戏
  • 长春企业免费建站上海知名seo公司
  • 莞城微信网站建设网页制作代码大全
  • 网站做代理服务器厦门人才网官网招聘
  • 做本地团购网站怎么样网络推广与优化
  • 公司注销网站备案成人用品推广网页