Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.
If you find these projects useful please consider becoming a sponsor with Patreon, GitHub or Liberapay.
I am studying an demo example "ResponseFilterBrowser".
Example uses windows messaging api (Winapi.Messages).
But i use Tchromium in windows less mode in a separate thread without windows.
How can i retrieve response body in thread?
Thanx.
You do not have the required permissions to view the files attached to this post.
TChromium events will be executed in CEF threads and you will have to store the body contents in a variable protected by a critical section.
After that, send a message to the thread that will handle the body contents with PostThreadMessage : https://stackoverflow.com/questions/139 ... hin-thread
I've never used it but some people recommend OmniThreadLibrary to simplify thread handling : https://otl.17slon.com/
I've never tried this with that component but in theory you can set GlobalCEFApp.MultiThreadedMessageLoop to false, GlobalCEFApp.ExternalMessagePump to true and use the GlobalCEFWorkScheduler.
With that configuration the browser process message loop runs in the same thread.
The ExternalPumpBrowser demo has all the code you need to use the GlobalCEFWorkScheduler but I'm not sure it will work with TCEFUrlRequestClientComponent.