Recent

Author Topic: Websockets Server/Client Implementation  (Read 11896 times)

senglit

  • Full Member
  • ***
  • Posts: 131
Re: Websockets Server/Client Implementation
« Reply #30 on: September 14, 2022, 04:40:05 am »
hi.

I have a websockets server(something like the demo "broacast server") started as a thread in my app. In the main thread I want to detect if the ws server works properly. If something wrong, I'd like to destroy the old ws server thread and start a new one.

In other job thread, I just do it by "feedding dog", to inc a counter defined as global.

How to do it with ws server? When the ws server thread is started up and socket.start is called the ws thread lost the control of socket and handler. I don't know where to add the "feed dog" clause.
I use Win10 + Lazarus 2.2.0 + FPC 3.2.2. All 64bit.

 

TinyPortal © 2005-2018