converting file contents to packets..

Status
Not open for further replies.

v1gnesh

Contributor
im doin a project on data transfer through a network usin c..
can anybody help me out with how i can read the contents from a GIVEN file.. and convert them into data packets. so that those packets cud b placed on d network array and can b transferred to the destination..
thx in advance..
i tried my luck wid this i cudnt find anything useful..
can anyone help me out please..
 
Dude wht exactly are you looking at...

i believe you will be using the TCPIP Stack...

so you would be working wid Raw Sockets...

read up on Raw Sockets in XP...you will have to initiate a connection and then send da file contents as the Payload for packets..
 
I don't think raw packets are necessary. Just read the file into some buffer, then create a protocol for sending them. Eg the first 4 bytes would be the total size of the file, next 4 bytes would be packet size. Then hereafter, units of packetsize can be sent.
 
Status
Not open for further replies.