Android Question Websocket Client - Headers Error

jtare

Active Member
Licensed User
Longtime User
I just updated to the latest websocket client library to use headers, but I get an error while compiling.
B4X:
Compiling generated Java code.    Error
B4A line: 28
If headers <> Null Then ws.Headers = headers
javac 1.8.0_161
src\*********\websockethandler.java:72: error: cannot find symbol
_ws.Headers = _headers;};
   ^
  symbol:   variable Headers
  location: variable _ws of type WebSocketWrapper

B4A code:
B4X:
Public Sub Connect(Url As String, headers As Map)
    If ws.Connected = False Then
'        Try
'            Dim hmap As Map = ws.Headers
'            For Each k As String In hmap.Keys
'                Log($"${k} = ${hmap.Get(k)}"$)
'            Next
'            log(ws.Headers.Size)
'        Catch
'            Log(LastException)
'        End Try
        Try
            If headers <> Null Then ws.Headers = headers
        Catch
            Log(LastException)
        End Try
        ws.Connect(Url)
    End If
End Sub

Any idea of what could be causing this?
 
Top