Answer the question
In order to leave comments, you need to log in
How to implement PRC client-server?
Now I don't know where to turn. I can not implement RPC interaction in any way, I tried both in C ++ and Java. I can't even implement a normal connection. I searched all over the internet and couldn't find anything useful. If it's not difficult for someone, maybe implement and send me the source code? Just pass the string from the client "hello Server!" and the server will send "hello client" to the client. Languages: Java, C++, C#, Python.
Answer the question
In order to leave comments, you need to log in
For C++ Qt there is qjsonrpc or qxmlrpc . Libraries for python jsonrpclib, xmlrpc and many others are compatible with them.
Perhaps the problem is that you first need to understand what is meant by "server". Usually, the Application Server (SP) is meant, but even the most "fancy" application servers by themselves cannot answer your client even for the simplest "Hi". The server part of your application, deployed under the control of the JV, can answer. That is, first you choose a SP, then you read Google about how to deploy the simplest application with your logic on it, and only then choose any of the RPC implementation options and figure out how to deploy it in your server logic. Different RPC implementations may be available in the AS on different ports. In my opinion, protocols that work "on top" of HTTP are considered more common and more universal, in turn, among them,
Thus:
1. Just writing a client will not work, the task is complex and can be difficult for a beginner.
2. Select a SP (for Java, usually Tomcat or JBoss) and google how to deploy a web service running it.
When it works, there will be primary concepts of mechanisms, and a ready-made server application. With this, you can return to the original problem and decide more intelligently which protocol is most suitable for your needs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question