FCPPluginClient: Make final
FCPPluginClient: Add parameter to send functions which specifies the direction of the send (client to server or vice versa)
- The other way of implementing this would be to have the send functions of FCPClient be always client-to server and to have a separate class "FCPClientReplySender" which contains send functions for sending from server to client.
- Howver the sendSynchronous() will likely be complex and look the same for client and server, so it doesn't make sense to have two classes
- To implement sendSynchronous() cleanly, it will act like a normal send() and have the receiver send back an ACK with another regular send() call. The sendSynchronous() will have to intercept that ACK and swallow it. By having all messages flow through a single class - FCPClient - this can be easily achieved.
- Also, a client is a single entity, so it does make sense to represent it as a single object.
- Still, I acknowledge that it is a bit cumbersome to have the direction parameter and will keep thinking about an easier way of implementing this. Maybe I come up with one when implementing the actual send functions.