yshejia 0 Posted March 11, 2022 My program needs to use multiple icsproxys. When many clients connect, I can feel that the response of the main window is very slow. I want to run icsproxy in multiple threads at the same time to speed up the execution efficiency of the program. What should I do? Share this post Link to post
yshejia 0 Posted March 11, 2022 By outputting the current thread ID through debug, I found that multiple icsproxys work in the main thread. Share this post Link to post
Fr0sT.Brutal 900 Posted March 11, 2022 1 hour ago, yshejia said: What should I do? Launch bg thread with message pump. Look for demo example named "...IcsThreadDemo" or smth alike Share this post Link to post
Angus Robertson 574 Posted March 11, 2022 The ICS proxy component is not designed for use in threads, it listens in the main thread and all clients use the main thread. Testing has shown single threaded ICS servers can handle hundreds of simultaneous clients, although using SSL/TLS takes an appreciable time to setup a new connection and is a limiting factor in how many new connections can be accepted each second. Exactly how many clients are accessing the proxy simultaneously, using what protocols, and for how long. Quote response of the main window is very slow. Does your proxy have a GUI? That will almost certainly be the reason for the slow down. Angus 1 Share this post Link to post
yshejia 0 Posted March 11, 2022 7 hours ago, Fr0sT.Brutal said: Launch bg thread with message pump. Look for demo example named "...IcsThreadDemo" or smth alike Thank you! Share this post Link to post
yshejia 0 Posted March 11, 2022 6 hours ago, Angus Robertson said: The ICS proxy component is not designed for use in threads, it listens in the main thread and all clients use the main thread. Testing has shown single threaded ICS servers can handle hundreds of simultaneous clients, although using SSL/TLS takes an appreciable time to setup a new connection and is a limiting factor in how many new connections can be accepted each second. Exactly how many clients are accessing the proxy simultaneously, using what protocols, and for how long. Does your proxy have a GUI? That will almost certainly be the reason for the slow down. Angus Thank you!I seem to have found a way Share this post Link to post