Skip to content

How to decode websocket frame ? #19

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

Closed
johnzeng opened this issue Feb 7, 2017 · 4 comments
Closed

How to decode websocket frame ? #19

johnzeng opened this issue Feb 7, 2017 · 4 comments

Comments

@johnzeng
Copy link

johnzeng commented Feb 7, 2017

I wanna decode the frames and wait for a special frame, after decoding and analyzing this frame, I will disconnect it or let it pass. But this module just recv the frame and never put it back, so it can be a websocket server, but can't be a proxy for websocket.

Any idea to make it a proxy for websocket?

@agentzh
Copy link
Member

agentzh commented Feb 7, 2017

@johnzeng This library provides both a client and a server for websocket. You just need to connect the client with the server at the same time to form a websocket proxy.

@johnzeng
Copy link
Author

johnzeng commented Feb 7, 2017

Yeah....I get that from your mail list. Another question, how can I detect websocket closing if client closes the page without sending a close frame?

Another question is that I can find demos using the following codes:

while true do
 local tpe, data, err = wb:recv_frame()
....

But it will result in tons of time out errors, any idea about it?

@agentzh
Copy link
Member

agentzh commented Feb 7, 2017

@johnzeng Please use the mailing list for such questions. This place is for real issues in the code base. Thank you.

@johnzeng
Copy link
Author

johnzeng commented Feb 8, 2017

Giving an example which will end up with tons of time out error should be an code base 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