![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Oct 2005
Posts: 5
Rep Power: 0
![]() |
multi thread
hi all, i am making an multithread client that connects to differents servers using differents threads.
in the main window the user select the numbers of connections that the program will start. To make make this i created the threads inside a loop like this: GetDlgItemText(IDC_SIMULTANEOS, n); int a = _ttoi(n.GetBuffer(n.GetLength())); for(LONG i=0; i<a; i++) { m_serverName.GetText(i, str); ... .... pThread->ResumeThread(); } The program creates succefully the number of connections to the server specified in a, for example it creates 2 threads. Now, i need to do read operations on the different threads created. I can see theat write and read operations works only on the last process(thread, connection) created.(sniffing packets i realize that the data pushed are in the higher port number of the two established connections on my local machine to the second server on the list). How can i identify the different threads created in the loop and make write and read operations on them?? Thanx in advance. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|