Archived
This forum has been archived. Please start a new discussion on GitHub.
Hello, Marc!,following,I will trouble you with some questions
How do you do,Marc!
I want to write some cods to transfer files.Some days ago,I discoverd ICE.But, It isn't easy,because all documents are in English, I am in chinese,And I did not used ice ago.
Yet , it is very peremptorily.Marc,can you give me a demo about transfering files via ICE.I am very sorry to trouble you!
Thanks!
tsinyun710@yahoo.com.cn
I want to write some cods to transfer files.Some days ago,I discoverd ICE.But, It isn't easy,because all documents are in English, I am in chinese,And I did not used ice ago.
Yet , it is very peremptorily.Marc,can you give me a demo about transfering files via ICE.I am very sorry to trouble you!
Thanks!
tsinyun710@yahoo.com.cn
0
Comments
-
Have a look at the source code for IcePatch -- it shows how to do this.
Also, have a look at http://www.zeroc.com/vbulletin/showthread.php?s=&threadid=292.
Cheers,
Michi.0 -
I have already read the thread : "http://www.zeroc.com/vbulletin/show...=&threadid=292."
and the document about "ICEPath".
I found they helped me with less.0 -
And.I want to have some sample codes with VC7.01.0
-
Well, in outline, you can do something like this:
sequence<byte> BinaryFile;
interface FileStore {
BinaryFile get(string filename);
void put(string filename, BinaryFile file);
};
Then implement that in your server. You'll have to add appropriate exceptions, but that's about the gist of it. This works for files up to Ice.MessageSizeMax in length.
Cheers,
Michi.0 -
Hello,Michi!Thank you!
sequence<byte> BinaryFile;
interface FileStore {
BinaryFile get(string filename);
void put(string filename, BinaryFile file);
};
I have written these code to hello.ice.
After I ran "slice2cpp hello.ice",I got files:hello.h,hello.cpp.And I have written "helloI.h" with follow:
#ifndef HELLO_I_H
#define HELLO_I_H
#include <Hello.h>
class HelloI : public Hello
{
public:
virtual ::BinaryFile get(const ::std::string&, const ::Ice::Context&);
virtual void put(const ::std::string&, const ::BinaryFile&, const ::Ice::Context&);
};
#endif
I think that I will implement the "get" function and "put" function in "HelloI.cpp".
In them,I will implement read and wirte a file.what shall i pay attention to.0