iOS Question WebSocket Close

aaronk

Well-Known Member
Licensed User
Hi,

I am using a websocket in my B4i app. I am connecting it to my B4J app.

I have used:
B4X:
' Check make sure WebSocket is Initialized before trying to connect 
If ws.IsInitialized = False Then ws.Initialize("ws")
   
    ' connect to WebSocket server
    ws.Connect("wss://192.168.0.88:5001/app")
The app connects to my B4J webocket server fine, and triggers the ws_Connected sub once the connection is made. (which is fine)

However if I call:
B4X:
ws.Close
It never triggers:
B4X:
Private Sub ws_Closed (Reason As String)
    Log("**Connection Lost**")
    Log("Reason: " & Reason)
End Sub
If I loose connection to my B4J Server it also doesn't Tigger the ws_Close sub. (nothing gets logged when the connection is lost.)

Using B4i Version 5.00
iWebSocket Lib 1.10

Anyone know what might be wrong or what I might of missed ?
 
Top