ck电影院,农历八字算命,渔亦鱼
地址:https://github.com/davidfowl/multiprotocolaspnetcore.git
在一个kestrel服务上可以同时处理tcp,http,https等多种协议。
通过实现 connectionhandler 处理接入连接,connectioncontext.transport 实现system.io.piplines 中的接口iduplexpipe 。
webhost.createdefaultbuilder 时设置下就行。
.usekestrel(options => { // tcp 8007 options.listenlocalhost(8007, builder => { builder.useconnectionhandler<myechoconnectionhandler>(); }); // http 5000 options.listenlocalhost(5000); // https 5001 options.listenlocalhost(5001, builder => { builder.usehttps(); }); })
kestrel 的演进目标现在看来是要做一个通用的服务器。
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
asp.net搭建博客,使用BlogEngine.NET+MySql搭建博客
网友评论