From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

someone has an example of source code multithread server for me?

someone has an example of source code multithread server for me?
0 Kudos
Message 1 of 2
(2,571 Views)
I need to do same, haven't done it so far. What you want to do is on the
Server when a new client connects, you create a new thread and give that
thread the handle of the connection to the client. Now all communication
between the client and the server should be handled by the new thread.

In addition, rather than creating new threads for each client, I will use
ThreadPool function provided by the CVI.

I don't know much netwoking but from what I know the server will listen on a
well known port number for initial connection requets. But once the client
connects and you have offloaded client-server communication to your worker
thread from the threadpool, each client will be using a separate port
number. Maybe other people can clarify this further.


vishi

"nessuno"
wrote in message
news:5065000000080000002C760000-1042324653000@exchange.ni.com...
> someone has an example of source code multithread server for me?
0 Kudos
Message 2 of 2
(2,571 Views)