Click here to Skip to main content
15,885,366 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have Designed a Client Server TCP/IP windows based application.
My server has a list of live IP's (IP's which are connected to server) in the listbox control.
I type a Message and select some IP's from the listbox it works fine every 9 out of 10 times.
But Sometimes problem comes from the selected IP's one IP doesnot get the message and instead that IP some other Random IP from the Listbox receives the message though not selected.
This issue comes Randomly.
But for this issue my application cannot be Reliable.
I want to make it reliable.


Thanks in advance..
Posted

1 solution

Sounds like a synchronisation problem, and you're using indices of elements in the list box to map to indices of an internal list in the the server, which get out of sync. Does this happen when a new client connects or drops?

Try storing an object in the list which has all the information you need to know which client it is, and use SelectedItem instead of SelectedIndex (or the multi-select equivalent, i.e. use the item not the item index).
 
Share this answer
 
Comments
Prajakta Bhagwat 4-Aug-12 9:18am    
Thank you so much friend..
I'll try solving this way.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900