I am the newbie..I meet some problem..
I established the server that will send file to the client when the client connect to it.

I try to use the sockets example from SDK to
connect the server and it receive the context of the file...

How can i reformat it the the file instead of display the context of the file?(e.g. a.jpg)

I study some code about the file server. can i use this code to store the byte i recieved?
THX A LOT!!!!

const TPtrC KTestFile=_L("C:\\Nokia\\Images\\a.txt");
const TUint8* KTestData=_S8("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ");
const TInt KTestLength=36;
const TPtrC8 KTestDes(KTestData,KTestLength);
TBuf8<KTestLength+1> buf;
RFs TheFs;
RFile file;

User::LeaveIfError(file.Replace(TheFs,KTestFile,EFileWrite)); // create the file for writing
RFile f=file; // create a new handle
RFileWriteStream out(f); // open the file as a stream
out.WriteL(KTestDes); // write some test data (to a buffer)
out.CommitL(); // commit the data (to file)
TInt iFileSize;
file.Size(iFileSize); // get the size of the file
out.Attach(file, iFileSize); // prepare to append data to the end of the new file
out.WriteL(KTestDes); // append the test data
out.Close(); // close the file with test data written twice

User::LeaveIfError(file.Open(TheFs,KTestFile,EFileRead)); // open the new file again for reading
f=file; // create a new handle
RFileReadStream in(f); // open the file as a stream
in.ReadL(buf); // read file data into a user buffer
in.Close(); // close the file (and use the data in buf)