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

WebSocketHandler still doesn't send CloseFrame correctly #89

Open
Mizutama opened this issue Dec 9, 2013 · 0 comments
Open

WebSocketHandler still doesn't send CloseFrame correctly #89

Mizutama opened this issue Dec 9, 2013 · 0 comments

Comments

@Mizutama
Copy link

Mizutama commented Dec 9, 2013

You changed WebSocketHandler.HandleRequest() to send close frame as;
case DataFrame.DataState.Closed:
DataFrame closeFrame = context.UserContext.DataFrame.CreateInstance();
closeFrame.State = DataFrame.DataState.Closed;
closeFrame.Append( new byte[] { 0x8 } , true );
context.UserContext.Send( closeFrame , false , true );
break;
but it makes incorrect frame.
This could be (I've tested)
case DataFrame.DataState.Closed:
DataFrame closeFrame = context.UserContext.DataFrame.CreateInstance();
closeFrame.State = DataFrame.DataState.Closed;
closeFrame.Append( new byte[] { 0x88 , 0 } , false );
closeFrame.Format = DataFrame.DataFormat.Frame;
context.UserContext.Send( closeFrame , false , true );
break;

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

1 participant