[WebSocket] can my app detect a server using websocket component

Forge Component
(0)
Published on 2018-03-21 by Enrique Esquivel
0 votes
Published on 2018-03-21 by Enrique Esquivel

Hello,

I have an app which needs to look for a server (lets call it BuildingServer) and when it finds the server, needs to send it a message. So basically it is detecting a server and once it finds it, it then sends it a message. How can I do this using the websocket forge component?

Thanks

Mo

Mo Touman wrote:

Hello,

I have an app which needs to look for a server (lets call it BuildingServer) and when it finds the server, needs to send it a message. So basically it is detecting a server and once it finds it, it then sends it a message. How can I do this using the websocket forge component?

Thanks

Mo

Hi,

Its very quiet round here :-). Does anybody know the answer?

Thanks

Mo,


Yes, definitely you can try to connect to the server, or wait for the timeout, once connected with the socket you can send messages back and forth with the component provided. You can also use the events to react to connection life cycle.

Enrique Esquivel wrote:

Yes, definitely you can try to connect to the server, or wait for the timeout, once connected with the socket you can send messages back and forth with the component provided. You can also use the events to react to connection life cycle.

Hi Enrique,

Ok, this sounds good. I am doing a mobile app which will be running on phones and tablets, so have a couple of questions:

1) Will it work on mobiles?

2) I cant see any documentation in here about the package, so I assume everything is in the package when I download it. Do I make the same websocket calls or do you have a wrapper around it that I have to use?

3) If you have a wrapper, I appreciate a list of calls that I can make.


Mo,


1) Yes, we designed the component for mobile devices

2) Internally it is using a javascript library to use the native websockets on the browser and monitor the connection. Everything is packed in the OS Component and a couple of methods/triggers are exposed to send and receive messages.

Just drag the component to your screen, set up the connection parameters and use the methods and triggers 


Hi there,

I havent had much luck with the module. I created the app, downloaded the websocket module. I then use the dependencies and mde the module accessible to my app.

I dragged the module into my app. But then when accessisng the wsConnection structure, I can not enter any details for the connection at all (the same for userid and password). I even tried to open the structure in eSpace which does allow me to enter details for the structure but I cant see any of the details in my app. 


Does anybody knows what is happening and how do I get over this?

Thanks

Mo,