Jump to content
yshejia

How can I use icsproxy in multithreading?

Recommended Posts

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

By outputting the current thread ID through debug, I found that multiple icsproxys work in the main thread.

Share this post


Link to post
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

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

 

  • Like 1

Share this post


Link to post
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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×