I'm trying to learn XMPP chat using c# asp.net
I was sucessfully able to connect to facebook chat and send messasge.
Now I want to know to do I receive the message which other person has send me as reply.
Do we need to add listeners to TCP socket which we have used for sending message.
I don't want to use any XMPP library.
Please let me know, if there is any tutorial or good explanation about how messsages can be received?
My code to send message:
xml = "<message type='chat' from='-1034430826@chat.facebook.com' to='-100000960474935@chat.facebook.com' xml:lang='en' ><body>hi This offline message1</body></message>";
message = Encoding.UTF8.GetBytes(xml);
sslstream.Write(message);
sslstream.Flush(); //sending the response to the server with my parameters
myResponseAsSB.Clear();