stevenlovegrove / MqttDotNet

.net Implementation of the client half of the MQTT messaging protocol. MQTT is a lightweight, open specification publish and subscribe protocol cheifly developed by IBM. Details of MQTT can be found at http://mqtt.org.
MIT License
153 stars 91 forks source link

Windows Phone and improved "retained" support #5

Closed Hades32 closed 11 years ago

Hades32 commented 11 years ago

Hey, I added a small project with support for Windows Phone 7 (should work on 8, too) which is tested and works fine. The main changes are the addition of the WinPhone.SocketEx library to support advanced networking and a changed version of the file logger that uses an IsolatedStorageFile. I also added support for clearing retained messages. (Hint: they're broken on MqttDashboard.com but work fine on Mosquito). Would be nice if you could incorporate this. Best Regards, Martin

stevenlovegrove commented 11 years ago

Hi Martin, I'm surprised TcpClient isn't available in the framework for Win phone 7. I guess they're trying to force people not to make blocking calls. Ideally I wouldn't include a binary in the repo, but this one is so tiny and innocuous I guess it doesn't matter.

Thanks for contributing your patches. Steve

Hades32 commented 11 years ago

Cool, thanks! Yes, from what I have read, this seems to be reason for this. Though IMHO I think they should solved it like in Android: There is a "NetworkingOnMainThreadException"... Martin