The problem is, there is no null terminator for the message received from the server.
So, i fixed it at the server end, i.e , while sending the message from server , i made it null terminated.
Now it is working fine.
Thanks for your help.
Thanks & Regards S.Srinivasa Raghavan
Christian Biesinger wrote:
Srinivasa Raghavan wrote:
cli.recieve(&message);
cout<<message;
firstly I'm not sure why this is related to xpcom at all...
Secondly... where is the length of the received message stored? It does not seem likely to me that it is null-terminated, because socket reading functions don't usually nullterminate their output, as the data may well be binary. so you do need to find out the length and output only the first N characters, I suppose.
it also seems likely that you have a memory leak in that code...
it's really hard to tell without knowing where your ClientSocket class is coming from/how it looks.
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
_______________________________________________ Mozilla-xpcom mailing list [EMAIL PROTECTED] http://mail.mozilla.org/listinfo/mozilla-xpcom
