SuperSocket icon indicating copy to clipboard operation
SuperSocket copied to clipboard

请问2.0版如何在PipelineFilter中获取当前连接的Session

Open leen2175 opened this issue 4 years ago • 1 comments

希望在PipelineFilter的时候对session中的自定义属性进行赋值,而不是每次到command中进行这样的操作,请问应该怎么做?

leen2175 avatar Jul 12 '21 07:07 leen2175

用Context吧,通过session传入。

https://github.com/kerryjiang/SuperSocket/blob/dd433469c7eb89b09c7593e8607721e7decafc74/src/SuperSocket.ProtoBase/IPipelineFilter.cs#L9

kerryjiang avatar Oct 18 '21 07:10 kerryjiang