
Whenever a JSON message received on client side, the JSON will be parsed and appropriate action will be taken. Below is example of JSON when a client joined the conversation that contains the client name, session id and number of people online.Ĥ. Each JSON contains a node called flag to identify the purpose of JSON message. JSON strings will be exchanged between server and client as a communication medium. There will be another method available to send message from client to server, or vice versa.ģ. When a socket connection is established few callback methods like onOpen, onMessage, onExit will be triggered on the both the ends (on server side and client side).

The server is capable of opening concurrent connections when there are multiple clients.Ģ.

When the android app or web app connects to socket server, the server opens a TCP connection between server and client. First we’ll have a socket server running.

Below you can find a brief info about how our app works.ġ. If you are coming across the ‘sockets’ for the first time, the wikipedia page give you basic knowledge about socket communication.
