How can I develop a File transfer application?question 2

xiehuaxiehua Member ✭✭
question 2,how can I break through The hard limit of 1MB in Ice as the maximum request size on file transfer?

marc tell me that:
one way is to set Ice.MessageSizeMax (in KB) to the desired maximum.

I lookup the pdf and try ,but I fail. I am sure that I can't know
how to set this due to my poor english.can you help me?

the thing I try is as follow:
I add follow 2 to my code
Ice::PropertiesPtr properties = Ice::createProperties(argc, argv);
properties->load("config")

and in the file "config",I add line " Ice. MessageSizeMax=10000"

and then I initialize my Communicator as follow:
Ice::CommunicatorPtr ic;
ic = Ice::initialize(argc, argv,properties);


but when I run the application,error report
"version mismatch"

I am so confused!

xiehua

Comments

  • marcmarc FloridaMarc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications EngineAdministrators, ZeroC Staff ZeroC Staff
    The version mismatch means that you do not link the correct version of the Ice library. It has nothing to do with the max. message size.

    Perhaps you still have some old Ice version installed somewhere, which is used instead of the new one?
  • xiehuaxiehua Member ✭✭
    I install Ice 1.20 once in my machine with your install package for vc 7.1

    ---development platform
    vc 7.1
    win2000 professional simplified chinese
    ice 1.20
  • marcmarc FloridaMarc LaukienOrganization: ZeroC, Inc.Project: The Internet Communications EngineAdministrators, ZeroC Staff ZeroC Staff
    What is the exact error message you get? (Cut & paste)
  • xiehuaxiehua Member ✭✭
    sorry for my stupid .

    I find the mistake.
    in

    ic = Ice::initialize(argc, argv,properties);
    I should use
    ic = Ice::initializeWithProperties(argc,argv,properties);

    thank you !It work.

    now I try to study to transfer file in chunk.
Sign In or Register to comment.