Anonymous User
  Saturday, 30 May 2020
  2 Replies
  1.1K Visits
  Subscribe
Sergio,

One of my application servers will receive a request, do some work on the request, call several other services via websockets (or I could use REST) , and then return the response. I am thinking about how best to use TsgcWebSocketClient_WinHTTP on a TsgcWSServer_HTTPAPI.TCPServer Thread.

Question: In sgcWebSocket_Client_WinHTTP: Would it be appropriate/would it work to declare

var
oAsyncClients: TsgcWSAsyncClients = nil;

as

threadvar
oAsyncClients: TsgcWSAsyncClients = nil;

so that TsgcWSClient_WinHTTP would only search a thread local list of clients? Would this work just fine in all cases?

Do you have any examples/suggestions for a server that proxies a connection to another server using TsgcWebSocketClient_WinHTTP and sgcWebSocket_Client_WinHTTP?

Thanks,

D