There are several popular WebSocket libraries supporting real-time commutations for client apps and servers. Unlike the HTTP protocol, where you request data and receive responses, the WebSocket protocol provides a bi-directional communication channel over a TCP connection. Messages can be sent and received in real time over a single WebSocket channel.
With those advantages, WebSocket protocol is widely used in mobile apps enabling features like social/chat feeds, collaborative features, geo-locations, as well as sport updates and financial tickers. Jetfire is one of the commonly used open-source libraries for iOS apps. This library is implemented in Objective-C supporting Transport Layer Security (TLS)/WebSocket Secure (WSS).
If you are an enterprise app developer, in addition to implementing the Jetfire library to apps mentioned earlier, you might need secure enterprise connectivity between your mobile client app and a server behind the enterprise firewall or on the Internet.
The easiest way to establish secure communications between your app and enterprise servers is using the secure communication channel provided in the BlackBerry Dynamics SDK. In the BlackBerry Dynamics framework, you can utilize GDSocket for bi-directional data communication between clients and servers. SSL and TLS are supported as well.
To help you even further, we have open-sourced a WebSocket library in BlackBerry GitHub repo. This is an Objective-C library based on Jetfire and GDSocket. You can head over to BlackBerry Dynamics WebSocket Library in GitHub to access it. Also, check out the SimpleTest app available in the GitHub repo. It demonstrates how to use and test the Jetfire WebSocket client library with the GDSocket in the BlackBerry Dynamics frameworks.
I hope this blog gave you some useful info on Secure WebSocket programming. I encourage you to explore the library in the BlackBerry GitHub and let us know if you have any questions or suggestions.
Happy Coding everyone!