Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate parsed WebSocketFrame to ensure it was sent as per protocol specifications #2

Open
gacardinal opened this issue Jan 15, 2019 · 1 comment

Comments

@gacardinal
Copy link
Owner

Sometimes, it's possible that the WebSocket frame parser will 'successfully' parse a frame but that the frame may not be valid. For instance, passing a buffer byte[] buff = new byte[2] {0x0, 0x0} will not fail but it is obviously invalid.

Using a contract or assertion library for this may be a good idea.

This should probably be implemented as a static method along with the SocketFrame.TryParse() and SocketFrame.Unmask() methods.

@shelbyyyyy
Copy link

@Gaboik Is this still relevant? If not, please delete/close the issue. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants