"To take this approach, you will need to define your message types in a dll shared between client and server." . . . .