It is my understanding, right or wrong, that desktop applications communicate with each other via sockets over localhost, similar to how a web server and local client use sockets or websockets.
For web-based APIs, both sockets and REST are language-agnostic, right? They can be requested regardless of the client app language.
For desktop app APIs, such as Bloomberg or Interactive Brokers, they are documented to use TCP socket connections.
When the Interactive Brokers API says it supports Python, Java, C++, C#, the downloaded API folder includes source codes for each such language and such respective classes/modules must be imported into the client codes to invoke the API calls. So if I use Java, the API Java classes must be in the classpath and imported.
The InteractiveBrokers application is coded in Java. When a function is invoked from API, it shouldn’t matter at all for that app what API language the client is using, right? So when a Python or Java API user calls placeOrder(what, where, price)
, the very same Java-coded function is invoked after receiving the parameters, right? As long as connection is set up, the functions can be invoked as long as the correct signatures are used right, so why the client language matters?
My question is, when a desktop app has an API (TCP connection), is the communication with the client app language-agnostic like a web app API? If so, when the API says it supports language Python Java and C#, doesn’t it only mean it provides some neccesary source codes in those languages to be imported. In other words, if some 3rd-party can replicate those exact source codes in another langauge like Go, can’t the client then use the API in that language?