By Admin on Sunday, 19 July 2020
Category: All

WebSockets TMS Sparkle

​A customer ask if TMS Sparkle and sgcWebSockets can run together, and the answer is yes, there is no problem running sgcWebSockets and TMS Sparkle on the same server. Both can run using HTTP.SYS server, you can run a single HTTP.SYS server and configure endpoints to run with Sparkle and sgcWebSockets without problems. Basically you configure in each package which endpoint will handle.

sgcWebSockets can run in HTTP.SYS server through HTTP API Server:

https://www.esegece.com/help/sgcWebSockets/#t=Components%2FTsgcWebSocketServer_HTTPAPI.htm

Find below 2 samples which show how sgcWebSockets and TMS Sparkle can run on the same HTTP.SYS server.

sgcWebSockets Sample

TMS Sparkle Sample

Compiled Samples

Follow the instructions below to run the samples:

1. Execute sgcWSServer as Administrator. Will open a WebSocket server, listening on port 2001 and endpoint "/ws"

2. Execute HelloWorldServer. Will open a REST server, listening on port 2001 and endpoing "/rest"

3. Open a websocket connection to ws://127.0.0.1:2001/ws. You will get a message from server after connect and if you send any message will be returned by server automatically.

4. Open a http connection to http://127.0.0.1:2001/rest. A simple response from REST server will be shown. 

Related Posts