This repo contains a module that allows to perform Call, Publish and Subscribe Wamp requests over a secured connection (wss protocol) with Autobahn WebSocket library. If websocket close connection there is periodic task (heartbeat) to make reconnection in indicated interval.
Make connection to websocket, response callback registration needed:
WsManager.getWsManager()
.setPort(String port)
.setLog(boolean isLogOn)
.setHeartBeat(long heartBeatPeriodInMillis)
.connect(Context context);
Make disconnect in websocket, response callback un-registration not needed:
WsManager.getWsManager().disconnect(Context context);
Register callback to receive responses from websocket:
WsManager.getWsManager().registerCallback(Context context, WsCallbackListeners wsCallbackListeners);
Unregister callback to receive responses from websocket:
WsManager.getWsManager().unregisterCallback(Context context);
Subscribe:
WsManager.getWsManager().subscribe(Context context, String topicName);
Call:
WsManager.getWsManager().call(Context context, String topicName);
Publish:
WsManager.getWsManager().publish(Context context, String topicName, String msg);