Novak Djokovic and Roger Federer through at Wimbledon

Defending champion Novak Djokovic and six-time winner Roger Federer both booked their places in the third round at Wimbledon.

Djokovic won 6-4 6-4 6-4 against American Ryan Harrison, with the match played under the Centre Court roof and finishing just before 22:00 BST because of an earlier rain delay.

The Serb, 25, next plays Czech Radek Stepanek or Germany's Benjamin Becker.

Third seed Federer comfortably beat Italian Fabio Fognini 6-1 6-3 6-2.

Djokovic was far from his best and had a slight scare when he trailed 0-40 to his 20-year-old opponent at 2-3 in the second set, but survived the break points before recovering and then regaining control.

He failed to convert his first match point but sealed victory with a service winner.

"It was a straight-sets win, but it was much more difficult than the scoreboard suggests," Djokovic told BBC Sport. "I was in trouble in the second set. It was difficult to adjust your movement under the roof; Ryan was serving fantastic and it made for a great match.

"It was a close match because he performed really well when he needed to but I got the crucial breaks when I needed to."

Federer, meanwhile, had little trouble seeing off Spain's Albert Ramos in the opening round and it was a similar story against Fognini, whom the 30-year-old Swiss had beaten comfortably in their only previous meeting at the Montreal Masters in 2007.

He took just one hour and 19 minutes to see off Ramos and was even more efficient against Fognini, sealing his passage to the next round in only 74 minutes.

"I think I played a great first round and great second round and I am very pleased with how I am playing overall," said Federer, who is bidding to equal Pete Sampras's record of seven Wimbledon titles.

"The seeds might be coming my way now, which will probably be more difficult, but we will see how it goes. I have a day to prepare and hopefully I will play well on Friday."

Federer and Fognini were playing in front of royalty on Centre Court, with Prince Charles and the Duchess of Cornwall both in attendance.

"We were briefed beforehand so you behave, but we were asked to bow which was no problem to do and we are thrilled the Royal family came to watch," said Federer.

Next up for Federer is French 29th seed Julien Benneteau, who overcame a spirited battle from American Michael Russell to win 7-6 (7-4) 2-6 6-4 7-5.

Frenchman Richard Gasquet had little trouble beating Ruben Bemelmans of Belgium as the 18th seed progressed to the third round with a 6-3 6-4 6-4 win.

In action delayed from Tuesday's first round because of the weather, seventh seed David Ferrer saw off Germany's Dustin Brown in straight sets. The Spaniard won 7-6 (7-5) 6-4 6-4.

Canada's Milos Raonic beat Santiago Giraldo 6-4 6-4 6-4 while Lukasz Kubot overcame Tatsuma Ito 7-6 (8-6) 6-3 6-3. He will play Marin Cilic in the second round.

Finally, Ivo Karlovic progressed with a 6-4 6-4 7-6 (7-5) win over Dudi Sela and will face Britain's Andy Murray on Thursday.