Archived

This forum has been archived. Please start a new discussion on GitHub.

ICE.MessageSizeMax

I use the sequence of bytes of data transmission, when the volume of data in memory to 512 M. limited memory wrong, but I set up the biggest news for the 1 G;

config server:"ICE.MessageSizeMax=1048576"

code:
try
{
char *stri;
long t;
std::vector <char> send;
FILE *stream = NULL;
std::vector<char> strC;
string str;
for(int i=1;i<=51;i++)
{
char st[3];
itoa(i,st,10);
str=st;
const char *str1=str.c_str();
stream = fopen(str1, "rb" );
if( ( stream == NULL) )
printf( "The file was not opened\n" );
else
printf( "The file was opened\n" );

fseek(stream, 0, SEEK_END);
t = ftell(stream);
stri=(char*)malloc(t);

fseek(stream, 0, SEEK_SET);
fread( stri,1,t,stream);

for(long j=0;j<t;j++)
{
send.push_back(stri[j]);
}
}

fclose(stream);
pair<const Ice::Byte*, const Ice::Byte*> byteArr;
const unsigned char *B=(unsigned char*)send._Myfirst;
byteArr.first =B;//
byteArr.second = byteArr.first+send.size();
free(stri);
double end, endm, endsu;
SYSTEMTIME sys;
GetLocalTime( &sys );
end=sys.wMilliseconds;
endm=sys.wSecond;
endsu=endm+end/1000;

for(int num=1; num<=1; num++)
{
proxy->recvByteSeq(endsu, send.size(),num ,byteArr,current.ctx);
}

}
catch(const Exception& ex)
{
cout << ex << endl;
}
1: ICE on the size of the data have limitations ?
2: large of data transmission, whether you have the suggested size.

Comments

  • matthew
    matthew NL, Canada
    The property must be set on both the client and the server. It seems from your description that you have not set this in the client application. Also, the name of the property is case sensitive. That is, it is:

    Ice.MessageSizeMax

    not

    ICE.MessageSizeMax
  • bernard
    bernard Jupiter, FL
    Also, you may want to read this FAQ entry.

    Cheers,
    Bernard
  • Hi
    matthew wrote: »
    The property must be set on both the client and the server. It seems from your description that you have not set this in the client application. Also, the name of the property is case sensitive. That is, it is:

    Ice.MessageSizeMax

    not

    ICE.MessageSizeMax

    Thank you!