Click here to Skip to main content
14,980,603 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
I have some code which has worked perfectly for many years compiled with VC++ 6.0 and it would detect that the server was not running but now I have compiled it with VS2008, it has stopped communicating (no warnings or errors when compiling). Has anyone come across anything similar? If it makes any difference, the client and server are currently on the same machine.

Thanks

Tony
Posted
Updated 1-Nov-13 23:27pm
v2
Comments
Richard MacCutchan 2-Nov-13 5:51am
   
No one can answer this question without more information. Use your debugger to trace where the problem is occurring.
softwaremonkey 2-Nov-13 7:12am
   
Thanks Richard. I appreciate my question was probably unanswerable, I just wondered if anyone had come across any porting issues from VC++6.0 to VS2008 when using CSockets. It seems the client and server connect OK but data transfers stop after a while and its difficult to know if its the client or server. Do you know of any tools that would allow me to monitor data on a specific TCP port?
pasztorpisti 2-Nov-13 8:10am
   
Instead of monitoring the traffic you should debug the state of the client and then the state of the server. Its most likely a bug in the networking code. Why didn't it happen with VC++6? But there is a huge difference between the code generator of VC++6 and VS2008, the latter is much better. Networking bugs are often multithreading related and multithreading related bugs can easily be dependent on timing, and timing can be dependent on the speed/optimization of the code. I remember that a few years ago I had a multithreading bug that appeared extremely rarely in debug-compiled code but it almost always happened in release builds. The reason was probably timing and the performance diff between the code of the debug build and the release build.
hasmukginoya 4-May-14 3:22am
   
Use Wireshark to view your socket send receive data.

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