TCP .NET/C# Server with Java client?

Started by
1 comment, last by Rich76 13 years, 2 months ago
I have a .NET TCP server and client. I have a Data library with Structs, Classes, Serialize/Deserialize methods that is used by both the server and client to communicate over TCP. What can I do to allow my .NET TCP server to communicate with a Java client?

The data is contained in Structs and Classes and then serialized with protobuf-net. I imagine .NET Classes/Structs don't equal Java Classes/Structs..

What do I need to do to make this work? I know there is terminology for what I'm trying to do, but I can't think of it..
Advertisement

I have a .NET TCP server and client. I have a Data library with Structs, Classes, Serialize/Deserialize methods that is used by both the server and client to communicate over TCP. What can I do to allow my .NET TCP server to communicate with a Java client?

The data is contained in Structs and Classes and then serialized with protobuf-net. I imagine .NET Classes/Structs don't equal Java Classes/Structs..

What do I need to do to make this work? I know there is terminology for what I'm trying to do, but I can't think of it..


You need to implement a (wire) protocol that both sides understand. If you use "protobuf" (the IDL described by Google) as the wire protocol, there should be a library for Java that can read those.

Also, there are a number of cross-platform techniques for sending objects and requests across a wire, including XDR (for UNIX, used for the NFS), DCOM (used by windows) and CORBA (used by enterprise systems). Java RMI, or .NET Remoting, are similar, but are not designed to be cross-language.
enum Bool { True, False, FileNotFound };

You need to implement a (wire) protocol that both sides understand. If you use "protobuf" (the IDL described by Google) as the wire protocol, there should be a library for Java that can read those.

Also, there are a number of cross-platform techniques for sending objects and requests across a wire, including XDR (for UNIX, used for the NFS), DCOM (used by windows) and CORBA (used by enterprise systems). Java RMI, or .NET Remoting, are similar, but are not designed to be cross-language.


As usual, thank you for the help. :)))


This topic is closed to new replies.

Advertisement