Make server/client distinction environment-agnostic