hello every body
i try to develop a client and a server project by visual studio 2010!
now i have alot of question
1- how can i test the connection between client and server???
2- how my server could have a list of connected clients???
please help me i am a beginner!!!
To test your programs start them both on your machine and use the loopback device (IP: 127.0.0.1, name: localhost) for listening and connection.
If a server accepts and handles multiple connections at the same time the state of each connection is typically stored in some manner. This must be implemented by you and the information to be stored depends on your requirements. If you need a list of clients, one piece of information to be stored is the client IP.
I suggest to start with a server that accepts only one client at time. Then you can test the communication and implement multiple client support when the other things are working.
In addition to what Jochen has mentioned, I would look at WireShark which is a tool to view network communications. I have found it invaluble for debugging network type applications, though I think client and server have to be on different machines (I could be wrong on that one) for Wireshark to record the data.
I downloaded a project from codeproject that makes multiple selection posibible on a CTreeCtrl. The link is: [^]
The downloaded project works fine, I mean it works to select multiple lines with the Ctrl key.
I created a project on my own, taking from the downloaded project just CCustomTreeCtrl files, because I need just CCustomTreeCtrl. So, my problem is that it does not work to select multiple lines in the tree control in my project, but in the downloaded project it does. How can this be? I cannot figure it out. I checked and double checked to see if there's any notable difference, and I can't see any.
At first glance, that article seems to be more geared towards rubber banding a selection. While Ctrl+Click may work, too, there may be extra code there that is messing you up. Perhaps you could use Paul DiLascia'c code from here, or a related article (alas with more features) from here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
I tried the code from the second link. It behaves the same as the code from Syed Babu from codeproject. If I select multiple items using Ctrl and left mouse button it selects JUST THE LAST 2 previously selected items; the first item selected in a row of three is always deselected. I don't get it, I have the same code as the original code. There's something strange here.
There's not much to elaborate. I just took this code, all these functions, and put them in my CTreeCtrlXML class which is derived from CTreeCtrl. And I have the problem I wrote above.
I have the same exact problem by using the Syed Babu code from here: MultiSelection Tree Control[^]
It is right, Firstly, you should use ::GetModuleFileName(NULL, ...) to get the path of your application image,
and then, get what you want by this path.
If you set the path as const value, it's not convenient!