Archived
This forum has been archived. Please start a new discussion on GitHub.
"Ice.MessageSizeMax" dosen't work in IceE.1.1.0 c++
in Help Center
I changed the Ice.MessageSizeMax's value to 4096 in server side , but IceE (server side) don't allow the byteSeq data's size > 1024,
help.
help.
0
Comments
-
This is explicitely tested in test/IceE/operations -- so its highly unlikely that this is broken. I suspect that the problem is on the client side -- that is the client cannot send more than 1024 bytes and you get an error.0
-
Can you please update your user profile (first + last name, project)?0
-
My client is written with C++builder2006, and Ice version is 3.2 for bcb.
following is the main code :
Ice::CommunicatorPtr ic = NULL;
ic = Ice::initialize();
try
{
Ice::PropertiesPtr prop = ic->getProperties();
stringstream ss;
std::string msg;
ss << "CrossUp:tcp -p " << m_port <<" -h " << m_ip.c_str();
prop->setProperty("Ice.MessageSizeMax", "4096");
Ice::ObjectPrx base = ic->stringToProxy(ss.str());
CCrossUpdatePrx up = CCrossUpdatePrx::checkedCast(base);
//
// m_data is ByteSeq, not out; msg is a out string for receive error message
//
if (up->update(m_data, msg))
{
ShowMessage("Ok");
}else {
ShowMessage("Failed: "+String(msg.c_str()));
}
}catch (const Ice::Exception &ex)
{
stringstream ss;
ss << ex << endl;
ShowMessage("[failed]: "+String(ss.str().c_str()));
//
// following exception message is shown when m_data.size() > 1M bytes.
// ..\..\include\Ice/BasicStream.h:109: Ice::MemoryLimitException:
// protocol error: memory limit exceeded
//
}catch(...)
{
ShowMessage("unknown exception.");
}
ic->destroy();
ic = NULL;0 -
I think the problem is that you initialize the communicator with out properties.
you must use the initialize versions with InitializationData and create properties before initialize the communicator object
see Ice Manual 32.2Ice::InitializationData id; id.logger = new MyLoggerI(); id.properties = Ice::createProperties(); id.properties->setProperty("Ice.MessageSizeMax", "4096"); Ice::CommunicatorPtr ic = Ice::initialize(argc, argv, id);
0 -
I think the problem is that you initialize the communicator with out properties.
you must use the initialize versions with InitializationData and create properties before initialize the communicator object
see Ice Manual 32.2Ice::InitializationData id; id.logger = new MyLoggerI(); id.properties = Ice::createProperties(); id.properties->setProperty("Ice.MessageSizeMax", "4096"); Ice::CommunicatorPtr ic = Ice::initialize(argc, argv, id);
xdm,thank you very much, This problem has troubled me for a whole day.
thank you.:)0