fix: const correctness in polymorphic_socket_base
refactor: write_type suffix -> server_type