I'm currently using a websocket at the moment to talk to my web ui.
Yes, it is a bit of a work around but all of my logic/processing is done in my external app, most of the 'smart' data I need is stored externally in a db so I only need cad for graphical representation and to pick points and entities etc (basic user interaction stuff). The reason is I want the user to be able to use the data for whatever they need without being tied to cad all the time.
The work around is mainly in building the api for user interaction but it's really basic, just things like 'pick point' etc then I pass the point through the socket to my app for processing via json.
I can send commands back the same way, this requires you set up some kind of protocol for packing/unpacking data and commands.
The app can run in a web browser or a webview component in a form. It works well
![Smiley :)](https://www.theswamp.org/Smileys/black/smiley.gif)
...
A socket sounds interesting, but I’d bet that’s against the EULA..
Something like.. pseudo code
...
hmm, I don't see why it would be a problem when most of the COM api is exposed and can be used externally, I guess we'll find out
![Smiley :)](https://www.theswamp.org/Smileys/black/smiley.gif)
Nice, neat socket code btw
![Smiley :)](https://www.theswamp.org/Smileys/black/smiley.gif)
I've found I needed to set up a ping event to keep the client socket alive, they will time out after something like 120 seconds, I set one for every 30secs.