Hello,
I am currently working on 2 .NET apps which must communicate with each other. Simple Windows Messaging was chosen and this works nicely at the moment. The data that is sent in the messages is a simple string, but now I have created a message class which contains a command (enum) and a data (string) member, and later possible other members.
When I send an instance of such an message class, it is serialized to bytes and then converted to a base64 string. This is then sent out using Windows' SendMessage(). On the other side I do the opposite. Eventually, the original object is restored and available in the other app.
While this mechanism seems to work, I was wondering if this is safe to do. Indeed, there is some overhead, base64 string is much longer than the original string solution (but I would have to parse this tring manually to get command and data part) Is there a maximum size for messages that can be sent with SendMessage ?
Also I'd rather stay away from .NET remoting for this project and stay with the SendMessage solution.
Any idea's ? Maybe use JSON instead to limit the overhead ?
Thanks.
Pika