Home Help Center

Right assumption: auto generated stubs serve client and servants?

mwpowellhtxmwpowellhtx Member Michael PowellOrganization: DetectachemProject: SEEKER ✭✭
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...

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Michael,

    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.

    Cheers,
    Benoit.
  • mwpowellhtxmwpowellhtx Member Michael PowellOrganization: DetectachemProject: SEEKER ✭✭
    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!
  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi Michael,

    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.

    Cheers,
    Benoit.
Sign In or Register to comment.