Structuring code between client/server

What’s the best way to organize your code for a multiplayer game? Share all code? Share no code? Have abstract base classes called “Player”, with a “ClientPlayer” and “ServerPlayer” extending it?