Skip to content

Handling messages equally on server and the client, without code duplication #667

Discussion options

You must be logged in to vote

Hi!

No your understanding is totally correct, there's no way to use exactly the same code for both client and server currently. The best you can do would be to have a shared function that you reuse in both the client and server code.

Usually it's pretty rare that client and server would want exactly the same logic, but yes I could see a world where an interface that is shared between ClientConnectionManager and ServerConnectionManager is provided

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@LukasBoersma
Comment options

Answer selected by Nul-led
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants