Web Connection
Integration with web socket API
Gravatar is a globally recognized avatar based on your email address. Integration with web socket API
  Darragh McGuire
  All
  Apr 29, 2021 @ 01:28am

Hi,

Can we use the wwWebsocket class in Foxpro to listen and send messages to a websocket provided by another software vendor? A lot of API's nowadays use Web Sockets, so it would be cool if we can use it for that.

Also, is there sample code for trying to reconnect to the WebSocket when the internet goes down on the Foxpro client?

Regards, Darragh

Gravatar is a globally recognized avatar based on your email address. re: Integration with web socket API
  Rick Strahl
  Darragh McGuire
  Apr 29, 2021 @ 01:15pm

Not really. The implementation is specific to handling a specific message format that can be routed into a Web Connection application. In order for that to work we need to have some custom information that generic requests would simply not have.

At some point I'll take another look and perhaps implement another separate API that just passes raw messages through, but I have to see if that will actually work. I rejected this idea originally because of... issues that I now can't remember exactly until I look at it again.

+++ Rick ---

© 1996-2021