Yes, as i was learning the basics of mqtt, i did try out the mosquitto clients, publisher and subscriber and they worked. SO I KNOW ITS MY CLIENT.
That's why I need help!! Why is it that when i carry over the same client source code and make a (somewhat) application out of it for an NS3 Node, it fails?
Why is it that the socket appears closed to the broker immediately after sending some data over?, which means the broker reads from the socket the first time. Btway, before the broker issues the socket-read-error, the socket passes the socket-write test (in the fd testing loop). Why does the socket-read fail? What happens to the frieking NS3 socket ? (4give my french. its frustrating!) Why does it appear closed ?
ps. I am using Debian 6 on a virtual box. I don't know if this is relevant but hey, anything to stop the pain