Anas b. Malik (Allah be pleased with him) reported:

Allah's Messenger (ﷺ) contracted marriage and he went to his wife. My mother Umm Sulaim prepared hais and placed it in an earthen vessel and said: Anas, take it to Allah's Messenger (ﷺ) and say: My mother has sent that to you and she offers greetings to you, and says that it is a humble gift for you on our behalf, Messenger of Allah. So I went along with it to Allah's Messenger (ﷺ) and said: My mother offers you salutations, and says that it is a humble gift for you on our behalf. He said: Place it here, and then said: Go and invite on my behalf so and so and anyone whom you meet, and he even named some persons. He (Anas) said: I invited whom he had named and whom I met. I (one of the narrators) said: I said to Anas: How many (persons) were there? He (Anas) said: They were about three hundred persons. Then Allah's Messenger (ﷺ) (said to me): Anas, bring that earthen vessel. They (the guests) then began to enter until the courtyard and the apartment were fully packed. Allah's Messenger (ﷺ) said: Make a circle of ten (guests), and every person should eat from that nearest to him. They began to eat, until they ate to their fill. A group went out (after eating the food), and another group came in until all of them had eaten. He (the Holy Prophet) said to me: Anas, lift it (the earthen vessel), so I lifted it, but I could not assess whether it had more (food) when I placed it (before Allah's Messenger) or when I lifted it (after the people had been served out of it). A group among them (the guests) began to talk in the house of Allah's Messenger (ﷺ) and the Messenger of Allah (ﷺ) was sitting and his wife had been sitting with her face turned towards the wall. It was troublesome for Allah's Messenger (ﷺ), so Allah's Messenger (ﷺ) went out and greeted his wives. He then returned. When they (the guests) saw that Allah's Messenger (ﷺ) had returned they thought that it (their overstay) was something troublesome for him. He (the narrator) said: They hastened towards the door and all of them went out. And there came Allah's Messenger (ﷺ) and he hung a curtain and went in, and I was sitting in his apartment and he did not stay but for a short while. He then came to me and these verses were revealed. Allah's Messenger (ﷺ) came out and recited them to the people:" O you who believe, enter not the houses of the Prophet unless permission is given to you for a meal, not waiting for its cooking being finished-but when you are invited, enter, and when you have taken food, disperse not seeking to listen to talk. Surely this gives the Prophet trouble", to the end of verse (xxxiii. 53). (Al-Ja'd said that Anas [b. Malik] stated: I am the first amongst the people to hear these verses), and henceforth the wives of the Apostle (ﷺ) began to observe seclusion (al-hijab).