Are there any Java client libraries for OpenSocial?

Is it possible to send data with Java over TCP and receive that data with a C# server?

  • For instance 2 computers on the same network, one has a Java client that outputs a string converted to bytes through an OutputStream (using port for example 4444), then the C# server would receive those bytes (from the same port 4444) and turn them into a string again and display whatever was sent from the client side. I already know how to do this with a Java client and server, I was just wondering if C# and Java can interact that easily. And I'm talking about standard native Java libraries and the same goes for C#. Thanks in advance.

  • Answer:

    Yes, look up "sockets programming" on both.

Ahmed at Yahoo! Answers Visit the source

Was this solution helpful to you?

Other answers

The client and server have no concern over what language each other use at all. The routing and data transfer is done entirely by IIS on Windows and Apache on Linux. The java running on the client sends an http data stream, and depending on if the server is Windows or Linux, it gets routed to the appropriate C#, ASP, PHP, Perl or some other CGI routine. If the server is Windows, then the Java client will be communicating with C# routines. Thinking about sockets is way too complex. That is for programming languages. C# and Java are not programming languages, but scripting languages interpreted at run time. The actual programs are the sandbox interpreters that execute the C# or Java, and they already are doing all the low level socket programming. You don't have to do any in C# or Java.

Look at the System.Net.Sockets name space, specifically the classes TcpListener and TcpClient, the Socket class might be interesting as well.

yes its possible. write in C# a socket listener program. write in java a socket write program and thats it. C# doesnt need to bother about java and java doesnt need to bother about c#

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.