Xxx mobile chat

IO library (client) for i OS and how to achieve real-time communication with a server, I decided that our best hit would be to create a chat application as the demo app of this tutorial.

Of course, we won’t make everything from scratch, as the point is to focus on the important details only.

Apart from the starter project that you have to download, you must also grab another file from here.

For now just get the file, and you’ll see next how to use it.

Or what if real-time conversation between users should be supported as an app feature?

A solution would be to let the app ask for new data the server quite frequently, so anything new to be grabbed as soon as possible.

The websocket communication relies on the client-server logic, where a persistent connection between a server and a client always exists.

To be more precise, the server “opens” a dedicated port where clients get connected to it.i OS apps exist in millions out there, and most of them communicate with servers to exchange data.In their majority, the server implements and provides RESTful APIs that apps can use for the communication.Thankfully (once again), here it comes into the play a really handful framework that takes charge of all the connection issues behind the scenes, and makes the socket-based communication a real piece of cake. With all the above in mind, I intend to give you in this tutorial a first taste of the Socket. I’ll show you how to integrate it and use it so you can exchange messages with a server, and I’ll try to explain through examples how the client-server communication works.As this introduction has become quite long already, I leave the details for later.Implementing the connection to a socket and communicating through it with a server is not the easiest task on the world. IO in a big project recently, and I had the chance to see how easy it actually is to have bidirectional communication with the server, and get messages instantly to the app.

Tags: , ,