Day086 — Socket IO server and client

Jacky Tsang
2 min readJun 20, 2019

--

I implemented

  1. a python SocketIO server
  2. a nodejs SocketIO server
  3. web SocketIO client hosted by a python server
  4. web SocketIO client hosted by a nodejs server
  5. an android app SocketIO client

In a local network. I tried to make it as simple as possible. They are base on Socket.IO v2. The client is used to leave messages on the platform. The server will then notify any connected client regarding on the message. No message is saved.

Please note that the socket.io andorid library v1.0.0 is not compatible with Socket.IO v1. As far as I know, there is no migration needed for the v2 upgrade. You just need to make sure the corresponding version is used on both client and server side.

Socket.IO Server 1.x suppport
The current version of socket.io-client-java doesn’t support socket.io server 1.x. Please use socket.io-client-java 0.9.x for that instead.

Another important note about the android app, I am using android v29 (pie) as the sdk compile version. To be able to point to “http://192.168.1.200” for local development, android:usesCleartextTraffic=”true” is needed to add to AndroidManifest.xml. You can find out more in this article, Protecting users with TLS by default in Android P.

reference:

--

--

No responses yet