Secure Web Sockets

41 views
Skip to first unread message

nick.kr...@gmail.com

unread,
Apr 7, 2017, 11:07:11 AM4/7/17
to CodenameOne Discussions
Before I pound my head trying to figure this out I'm wondering if anyone has any experience setting up WSS. I already have WS setup using the cn1websocket lib from Steve Hannah and it's on a remote server with an SSL cert already.

Steve Hannah

unread,
Apr 7, 2017, 12:17:18 PM4/7/17
to codenameone...@googlegroups.com
All you should need to do is change your URL from ws:// to wss://

It should just work, barring the same standard certificate issues that you would face in changing http:// to https://

Steve

On Fri, Apr 7, 2017 at 8:07 AM, <nick.kr...@gmail.com> wrote:
Before I pound my head trying to figure this out I'm wondering if anyone has any experience setting up WSS. I already have WS setup using the cn1websocket lib from Steve Hannah and it's on a remote server with an SSL cert already.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/0f06fa7f-e3c4-496f-ac52-5a69c8922ea5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

nick.kr...@gmail.com

unread,
Apr 7, 2017, 1:25:32 PM4/7/17
to CodenameOne Discussions
One of the exceptions I was getting before was: "SSLException: Unrecognized SSL message, plaintext connection?"

However, I "feel" like I haven't changed anything and I tried it again and it's working now. Moving on.

Do you have any insight on how to make each connection private? I'm assuming you just need to make a new connection on a different port?

I'll have to do some more research but thought I would ask anyways.

Thanks!

Steve Hannah

unread,
Apr 7, 2017, 1:30:05 PM4/7/17
to codenameone...@googlegroups.com
Can you elaborate on what you mean by "private"?  Isn't using SSL private?

Steve

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/d/optout.

nick.kr...@gmail.com

unread,
Apr 7, 2017, 1:40:16 PM4/7/17
to CodenameOne Discussions
It's for an app I'm making that only allows messaging between two people, not a group. I believe it's setup right now to send messages to everyone connected to the same socket connection. I would like to keep track of multiple messaging sessions and also store a certain amount of messages in a database.

Also, I'm assuming the answer for this is "it depends," but can you use this lib for a Push notification service?
Reply all
Reply to author
Forward
0 new messages