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

WebSockets & Java-WebSocket Library not working #11

Open
noblemaster opened this issue Apr 26, 2015 · 2 comments
Open

WebSockets & Java-WebSocket Library not working #11

noblemaster opened this issue Apr 26, 2015 · 2 comments

Comments

@noblemaster
Copy link

Let me just say that SimpleFramework is fantastic :)

In any case, I am having some troubles getting WebSockets to work correctly (using 6.0.1).
Although I am able to connect to SimpleFramework's WebSocket communication sometimes fails (succeeds about 30% of the time - JUnit). I am connecting with the Java WebSocket library (https://github.com/TooTallNate/Java-WebSocket). I tried with different protocols to no avail.

It's little bit difficult to find documentation on SimpleFramework's WebSocket, so I am not so sure if I am setting everything up correctly? I was following the spring.xml here (I am doing everything in code):
https://github.com/ngallagher/simpleframework/blob/master/simple-demo/simple-demo-chat/etc/spring.xml

Questions:

  1. What protocols are you supporting? All?
  2. Is there any more documentation on how to set up things in code.
  3. Do you have a Java websocket (not JavaScript) library you recommend with SimpleFramework?
  4. Edit: also it appears you are only using 2 threads for the chat demo. Is that correct? For about 1000 connections how many threads do you recommend?
@ngallagher
Copy link
Owner

Hi,

FYI there is only one protocol, it is the draft standard version 13. In production environments where users have a modern/recent browser this is the only version you will see. Take a look at https://tools.ietf.org/html/rfc6455, I have developed it verbatim from this document alone.

If you think framework does not work, I would need a test case written in Java that can prove your hypothesis. Alternatively, I think perhaps it is best to speak to the developer of the Java WebSocket library, it is much more likely there is a bug here.

Thanks,
Niall

@pschweitz
Copy link

pschweitz commented Jan 7, 2018

Hi,

I confirm it is working like a charm !
You can inspire form the webserver I wrote on top of the lib:

https://github.com/pschweitz/CheetahWebserver

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

3 participants