code: func (s *Server) ServeCodec(codec ServerCodec, options CodecOption) {
  	defer codec.Close()
  
  	// Don't serve if server is stopped.
  	if atomic.LoadInt32(&s.run) == 0 {
  		return
  	}
  
  	// Add the codec to the set so it can be closed by Stop.
  	s.codecs.Add(codec)
  	defer s.codecs.Remove(codec)
  
  	c := initClient(codec, s.idgen, &s.services)
  	<-codec.Closed()
  	c.Close()
  }
docs: // ServeCodec reads incoming requests from codec, calls the appropriate callback and writes
  // the response back using the given codec. It will block until the codec is closed or the
  // server is stopped. In either case the codec is closed.
  //
  // Note that codec options are no longer supported.