Single class, server/client functionality in one