Java – can sockets accessed in different programming languages communicate?

Is the socket programming language independent?

Can I keep the server written in Java and the client written in C?

Solution

absolutely. Otherwise, writing a web browser and web server will be very difficult, just as an example

Of course, data communicated through sockets may be easier to read than a language - for example, if you use Java's dataoutputstream, it will be easier to read data with Java management on the other end However, you can still read the data because the format has been recorded in detail

If you put absolutely platform specific data on the network, it makes things more difficult - for example, using objects serialized from Java's objectoutputstream on non Java platforms can be tricky

However, at the raw socket level, there is no concept of a programming language for writing source code

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>