|
|
|
|||||
|
I would like to be able to pass (potentially large) files between a server and client using ice... I've tried using sequence<byte> and it worked just fine at first but when the files got to a few Mbs things stopped working... (I got an unknown exception from the remote operation)
My setup is something like this: sequence<byte> ByteData; interface Client { void uploadFile( string filename, ByteData data ); }; interface Server { void login( Client* cli ); }; // in client server->login( client ); // in server void ServerI::login( ClientPrx client, ..... ) { // read file data client->uploadFile( filename, data ); } --- This works for small files, eg the test file I used first was 71k... For larger files I get "Unknown exception" in the server and ClientI::uploadFile is never reached on the client... So, is there a recommended way to do this? |
|
|||||
|
I think that you should consider a chunked transfer approach.
Something like: sequence<byte> ByteData; interface Receiver { void receive( ByteData data); void close(); }; interface Server { Receiver *transfer( string filename); }; Your client will send multiple chunks of the original file invoking multiple receive() until EOF. I have used this approach in Java and it is really ***fast*** (well, ftp is a little bit faster but....you have no objects !!) You can experience the performances using different chunk size. 64K it is rather good. Hope it helps, Guido. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| IcePy, large sequences | huberthoegl | Help Center | 6 | 01-11-2006 05:19 AM |
| Use ICE to send large files(C++)? | thelONE | Help Center | 6 | 10-15-2005 09:18 PM |
| Question about sending large data. | JaneShang | Help Center | 3 | 10-14-2005 01:25 PM |
| Large chunks of data | mwilson | Help Center | 6 | 09-12-2005 11:37 PM |
| IcePack.Registry.Data and IcePack.Node.Data directories | vsonnathi | Comments | 0 | 10-21-2004 06:12 PM |