SuperSocket icon indicating copy to clipboard operation
SuperSocket copied to clipboard

WebSocket HandshakeValidator passing the Session

Open ArvinHsieh opened this issue 6 years ago • 3 comments

Hi, Can you consider passing the session in handshakeValidator(p)? because during the handshake phase, we need to use Socket URL the QueryString for verification. Then store some verified info in the session object. DataContext field can be used to store custom objects?

ArvinHsieh avatar Apr 22 '20 15:04 ArvinHsieh

You can access the URL from package: https://github.com/kerryjiang/SuperSocket/blob/master/src/SuperSocket.WebSocket/HttpHeader.cs p.HttpHeader.Path

But you also want to assign state to session. Let me think about it.

kerryjiang avatar Apr 22 '20 20:04 kerryjiang

I made this enhancement, thanks for your suggestion. https://github.com/kerryjiang/SuperSocket/commit/d4e4546beca79ebdacc02a279eee6b2692d315f9

kerryjiang avatar Apr 23 '20 04:04 kerryjiang

I made this enhancement, thanks for your suggestion. d4e4546

Hi, It is very helpful to me. Thank you for considering.

ArvinHsieh avatar Apr 23 '20 05:04 ArvinHsieh