Jump to content

View more

Image of the Day

Adding some finishing touches...
Follow us for more
#screenshotsaturday #indiedev... by #MakeGoodGames https://t.co/Otbwywbm3a
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

TCP .NET/C# Server with Java client?

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
2 replies to this topic

#1 Rich76   Members   

207
Like
0Likes
Like

Posted 19 February 2011 - 03:30 PM

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..

#2 hplus0603   Moderators   

11195
Like
1Likes
Like

Posted 19 February 2011 - 06:05 PM

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 };

#3 Rich76   Members   

207
Like
0Likes
Like

Posted 19 February 2011 - 07:41 PM

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. :)))







Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.