| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…ent errors: see http://code.google.com/p/android/issues/detail?id=22970). Added the SSLSocketChannel file, and modified the WebSocketImpl to support its use. Added an example that shows how it would be used. Rebuild the distribution output.
|
@fomojola thank you very much! I will approach "merging" as soon as i can. |
Sorry, something went wrong.
|
@fomojola how did you make your browsers accept the certificate? |
Sorry, something went wrong.
|
You either have to use a properly chained cert or it is actually moderately painful: you basically have to visit the IP address using a regular https URL. The browser will prompt you with the usual security warnings and you have to accept the warning and create a security exception, and then it works after that. Very sub-optimal, but unfortunately no options. |
Sorry, something went wrong.
There was a problem hiding this comment.
@fomojola I am just testing around with ssl trying to simplify things if possible: 98f4a3c
And i am not sure what the 'handle' is for...? It seems to limit the number of simultaneous connections...
But even when i remove the handle as you see in my code my firefox somehow fails to create more that one ssl connection to the example server at a time.
I am probably missing some basic mechanic...
Do you have an explanation for that behaviour?
Sorry, something went wrong.
There was a problem hiding this comment.
You are right: handle was basically a remnant of my application that made it into the test file, since in my app I only allowed 1 connection at a time.
Creating multiple connections should be just fine: just strip out all references to handle and use arg0. I'm not sure what the default backlog is: I think it is 50 or something, but the base WebSocketServer doesn't set it when calling bind, so there may be something there that prevents multiple connections.
Sorry, something went wrong.
|
Does the WebSocketClient.java support wss? If yes, how to configure this? |
Sorry, something went wrong.
|
WebSocketClient.java and WebSocketServer.java do not care if you use ws or wss. SSLServer.java shows how to do that. Please also consider #111 and https://github.com/TooTallNate/Java-WebSocket#wss-support. |
Sorry, something went wrong.
|
Hello, |
Sorry, something went wrong.
|
I agree with @mparis, it would be great if you could update the outdated maven central release. Lots of developers prefer to pull down their dependencies from there. |
Sorry, something went wrong.
|
Actually yes, I too agree with @blunden, can you guys please update the maven central. |
Sorry, something went wrong.
|
@mfsi-ankitb The issue might be that it still has problems with working on both 5.0 and earlier versions. See #293 |
Sorry, something went wrong.
|
@blunden I tried using Java-WebSocket with the latest source code, and it is working for me on lollipop with WSS (using default SSLcontext). |
Sorry, something went wrong.
|
@mfsi-ankitb Oh, really? Did you confirm that it works with earlier Android versions too? I personally switched to a different lib for that issue. I know of others who would be interested to know that it has been fixed though. |
Sorry, something went wrong.
|
@blunden Yes, the connection opens and I am able to send and receive messages (checked in 5.0 and 4.1.1). But, facing some problems like connection breaks (doesn't connect back) when Internet Connectivity drops and reconnect again. And I can't connect back with same client once disconnect is triggered. |
Sorry, something went wrong.
|
@mfsi-ankitb Thanks for the confirmation! Yeah, you will need to recreate the WebSocket related objects. That seems to be the case in many WebSocket libraries. Perhaps you can reconnect in some onWebSocketError-like method? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
I integrated an SSLSocketChannel class (taken from the jFxp project at http://jfxp.sourceforge.net/ with permission by the author, Alexander Kout) and modified the WebSocketImpl to allow the use of that instead of a standard SocketChannel.
Also added a simple SSL example that uses a self-signed certificate. The example/SSLServer.java includes a really simple test case that uses a keystore generated using keytool (the keytool syntax is present in that file as a comment, as well as the keystore loading code required).