code: func (s *syncServer) serve(l *net.TCPListener) error {
  	defer l.Close()
  
  	s.server = rpc.NewServer()
  	s.server.Register(&SeesawSync{s})
  
  	for {
  		c, err := l.AcceptTCP()
  		if err != nil {
  			if ne, ok := err.(net.Error); ok && ne.Temporary() {
  				time.Sleep(100 * time.Millisecond)
  				continue
  			}
  			return err
  		}
  		raddr := c.RemoteAddr().String()
  		host, _, err := net.SplitHostPort(raddr)
  		if err != nil {
  			log.Errorf("Failed to parse remote address %q: %v", raddr, err)
  			c.Close()
  			continue
  		}
  		rip := net.ParseIP(host)
  		if rip == nil || (!rip.IsLoopback() && !rip.Equal(s.engine.config.Peer.IPv4Addr) && !rip.Equal(s.engine.config.Peer.IPv6Addr)) {
  			log.Warningf("Rejecting connection from non-peer (%s)...", rip)
  			c.Close()
  			continue
  		}
  		log.Infof("Sync connection established from %s", rip)
  		go s.server.ServeConn(c)
  	}
  }
docs: // serve accepts connections from the given TCP listener and dispatches each
  // connection to the RPC server. Connections are only accepted from localhost
  // and the seesaw node that we are configured to peer with.