Skip to content

Improve boundary between implementation and connection #17

@DanielSank

Description

@DanielSank

From Matthew's email:

It also seems less that ideal that the Connection class constructs the Calculator implementation internally. Instead, it would be good to construct the Calculator object, then separately start the server loop and pass the implementation object in to the server to call methods on. Right now this is tricky because the Calculator takes an outbound_requester as a parameter, but instead I would suggest that this should be passed as a parameter to the remotely-called method, e.g. you have an additional argument that is a reference to the caller who made the remote invocation, so that you can send messages to the caller if needed. Of course, putting the echo method on the caller and giving both client and server a Calculator implementation is a bit artificial anyway, but I think a reference to the caller would be useful in other situations as well.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions