StompProtocolAndroid icon indicating copy to clipboard operation
StompProtocolAndroid copied to clipboard

Socket connection disconnected with 1007 error code

Open ManishMaaruji opened this issue 7 years ago • 0 comments

screen shot 2018-11-28 at 6 25 45 pm screen shot 2018-11-28 at 6 25 54 pm

we have integrated this library for websocket stomp protocol in andriod app and we are getting 1007 error code everytime. we have sniffed the packed via wire shark and attached over here.

can you please provide any pointers for solve above concern.

Attached the code as well.

" fun connectStomp() { mStompClient = Stomp.over(Stomp.ConnectionProvider.JWS, "ws://205.147.102.113:8080/bitbuddy/bitbuddyLead/725/xg_rryql/websocket") val arrayList = ArrayList<StompHeader>() val stompHeader = StompHeader("usuario", "37") val headerData = StompHeader("version", "1.0") arrayList.add(stompHeader) arrayList.add(headerData)

    mStompClient.connect(arrayList)

    mStompClient.lifecycle().subscribe { lifecycleEvent ->
        when (lifecycleEvent.getType()) {
            LifecycleEvent.Type.OPENED -> Log.d(TAG, "Stomp connection opened")
            LifecycleEvent.Type.CLOSED -> Log.d(TAG, "Stomp connection closed")
            LifecycleEvent.Type.ERROR -> Log.e(TAG, "Stomp connection error", lifecycleEvent.getException())
        }
    }

    mStompClient.topic("/usuario/billetera/private/previous").subscribe { message ->
        Log.i(TAG, "Received message: " + message)
    }

}

"

ManishMaaruji avatar Nov 28 '18 12:11 ManishMaaruji