PDA

View Full Version : how to send file with qt c++?



wei243
26th February 2007, 14:07
i would like to make a program which able to send file over internet like skype does.
i dont know how to divide a big file to small packet and do crc checking also.
pls post any related source code or link to me.
thx a lot.

wysota
26th February 2007, 14:38
Any details? What protocol?

wei243
27th February 2007, 16:10
the file can be any picture, text file ect...
protocol = tcpip

sry i dont understand wat ur detail means by.....

wysota
27th February 2007, 19:46
Take a look at Fortune Server and Fortune Client examples that come with Qt. I think they have what you need.

wei243
3rd March 2007, 07:32
thx a lot wysota,
now i manage to send a small text file with tcpip, but i still face some problem....
1. if the file is quite big, how to divide it to smaller packet in sender program?
2. how to do crc checking?

wysota
3rd March 2007, 09:32
1. if the file is quite big, how to divide it to smaller packet in sender program?
2. how to do crc checking?

TCP/IP wil do both things for you. Just write your file to the socket and read it on the other end.