B4J Question Why Jwebsocket connet forbidden

Mscal

Member
Licensed User
Hello,I'm new in B4j.
I tried to use jwebsocket link "ws://127.0.0.1:8899" (local server),successed.

But when I link "ws://123.207.167.163:9010/ajaxchattest",it shows forbidden.
1.png
I wonder whether a Url with path cannot be linked by jwebsocket?
 

Attachments

Erel

Administrator
Staff member
Licensed User
I wonder whether a Url with path cannot be linked by jwebsocket?
No. That's not the issue.

But when I link "ws://123.207.167.163:9010/ajaxchattest",it shows forbidden.
It doesn't look like a web socket server.

Example:
B4X:
Sub Connect
   Dim ws As WebSocketClient
   ws.Initialize("ws")
   ws.Connect("wss://b4x.com:51041/smiley/ws") 'wss because it is a SSL connection
   Wait For ws_Connected
   Log("connected")
End Sub
 
Top