Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hello all

I am writing a file transfer code

I serialize an instance of filetransfer class
add chunks of file data to the object and then serialize that object.
after serializing I add a one byte of marker which indicates the end of the object data.

upon receiving each packet is added to a list of byte[] byte array.

once the receiving is done I create another list in which the data is rearranged with respect to the end marker.

I deserialize each byte array in the rearranged array to reconstruct objects and get file data. the code works for small files but fails for larger files with the serialization exception.

Please help how to send and receive objects using sockets.

Thanks all
Posted
Comments
Sergey Alexandrovich Kryukov 29-May-13 9:30am    
Not enough information.
—SA

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