Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Android Connect To WS Protocol

Android Connect To WS Protocol

Problem

I created an Node JS (using WebSocket) server for my client. I tested it with Javascript and it all works fine. But now I want to use that Connection in my app. The connection uses the WS protocol (ws://) and the server sends messages while the connection is open.

My question is: how should I open an ws:// connection and read the incoming messages?

Thanks a lot

Problem courtesy of: Bart Wesselink

Solution

You will need a WebSocket client library for Android/Java. You might have a look at AutobahnAndroid.

Disclosure: I am original author of Autobahn and work for Tavendo.

Solution courtesy of: oberstet

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Android Connect To WS Protocol

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×