This forum has been archived. Please start a new discussion on GitHub.
Right assumption: auto generated stubs serve client and servants?
Is it a right assumption that the auto-generated stubs serve both client and servant? We would extend those for more server-specific functionality, for instance? And could resolve, say, a registered interface to a class implementation (or to its interface for that matter)? If it matters: we're landing in a C/C++ realm; shouldn't matter per se though I imagine. Thank you...
What exactly are you referring to by auto-generated stubs?
When you compile a Slice interface, it generates the following:
- A servant class that the server can extend to implement the interface methods.
- A proxy class that the client can use to establish a connection to the server and invoke on the server Ice object incarnated by the servant.
See Ice Architecture for more information on the terminology and the typical client & server structure.
Auto-generated assuming slice2cpp (for instance) is incorporated as part of our build process.
So both client and server should reference the same code (headers, compile, statically or dynamically linked) for servant code and for client proxy?
With servants inheriting from generated servant code to implement as you said. Makes sense. Thank you!0
Yes, you should include the same source file for the client and the server, we do not generate separate files for the client and the server.