I am developing a program which sends images from one computer to another (similar to remote assistance without mouse/keyboard input). The two computers I use to test this are one Windows XP machine and one Windows Vista. I have the stationary XP machine directly connected to a router, and a laptop which is connected through wireless.
The transmission from XP to Vista works great, I am able to get a constant flow of images that are displayed on Vista. However, when I flip it and send images from Vista to XP it does not work. I also tried a local "copy", that is, without the network get a flow of images and this works on Vista as well as XP. It is the exact same program on both machines.
I don't think it matters but I am using GDI+ for the images. So I send a .jpg through a stream on the network and rebuild it on the other side.
My Network Message class is called NetMsg
. it consists of a char* type
and a char* data
. the types determine how I interpret the data, no issues here.
Let's call the computers #1 and #2.
When connection is created and I marked the area on #1 that I want to send:
001>#1 sends type RESIZE // to get the window on #2 the same size as the area I have marked on #1
002>#1 sends type PICTURE_DATA // this is the actual imagedata
003>#2 after received the two above messages, sends type REQUEST_MORE // #2 wants more imagedata
004>#go to step 1
I haven't even bothered to debug it when sending image data from XP to Vista, since it works great, exactly like I want it. However when Vista sends to XP I have noticed the following:
- Data received can actually be two
NetMsgs
. I have support for this by splitting the data into severalNetMsgs
- Data received can be incomplete, that is I have to wait for more data. I have support for this by marking a
NetMsg
as incomplete and on the next datatransmission complete it. (as well as a combination of the first step)
This almost did the trick because I got some images transferred correctly, however then it suddenly stopped. I have not debugged this thoroughly so I do not know why the data suddently stopped.. However:
What I do not understand is that this works great when sending from XP to Vista but not the other way around. What am I missing?
Do let me know if you need extracts of code, however, it is pretty huge... roughly 500 rows.. Otherwise I am looking for known issues when sending data from Vista to XP.