Is websocket is dedicated for browsers only

1k views Asked by At

I am trying to program a native Objective-C and Native Android application using 3rd Party libraries. I have already chosen the libraries and I am already progressing in it.

One person in my team argues that the websocket currently implemented in concentration to web browsers, If we use this 3rd party libraries to implement the same from a native application it may not be stable.

He says maintaining a websocket connectivity from a native mobile application could be trivial, But webkit browsers already does that naturally, therefore we should think about creating a hybrod app.

Can anyone throw a comment on this?

1

There are 1 answers

0
Myst On

Websockets can be used by any client (read: "app"), as long as the client implements the Websocket protocol - no browser (or hybrid) required.

For example, SocketRocket is an Objective C library that helps you implement Websockets in iOS native apps.

There's a nice article here about implementing Websockets in native iOS and Android apps.

I think that implementing Websockets without Webkit is a better way to go. Creating a Hybrid app can impact performance. If you're using only one feature (websockets), Webkit might be too heavy.

The only question is - are the libraries you are implementing mature enough?

Good Luck!