Krishna could well judge the object of the visit of an old class fellow after a very long peridd. He himself came to receive him at the gate and with great respect seated him besides his throne. Though Sudama had brought a small quantity of rice with him, he was not so bold as to present the same to the king. After asking about the well-being of Sudama's family, Krishna snatched the small bag of rice and there and then began to munch the rice out of great love and respect for his old friend.
Though Sudama could not tell Krishna about his straitened circumstances Krishna, provided all the where withals to Sudama's family before he reached back home. Sudama's example is often quoted to show the response of the Lord for love and devotion.
1. Kohli,Surindar Singh ed,Dictionary of Mythological References in Guru Granth Sahib 1993