2
votes

In UDP socket programming, does it matter if sender program is written in C and receiver program is written in Python? I mean to ask does it matter if sender or receiver programs are written in same or different language?

3
If you send binary data, you have to use "marshalling" or "serialization". Other than that it doesn't matter what language you use.Some programmer dude

3 Answers

1
votes

UDP is just a protocol, like HTTP so as long as your applications are compliant with the protocol, there is no reason why they would not be able to communicate that way.

Of course, if the content of the message requires a specific library / method to be interpreted, that's a different issue.

0
votes

No, it shouldn't matter. There are higher-level protocols that rely on UDP, and using those could depend on libraries (just as an example). But UDP itself has nothing to do with the language you use.

0
votes

No, that should not be a problem. I myself tested it to be sure that thing. I wrote a server in C and made a client in Java. It worked.

Moreover, I made a server program which runs on a production server which interacts with Symbian, Java and Objective-C based clients. So, it really does not matter.

Again, referring to the protocol hierarchies, you can think that when the network layer and transport layer info is cut off from the data, it really is raw data. And the client has a mechanism to handle such raw data. If the program is well written, there will be no such problem.