Mqtt protocol for windows phone - c#-3.0

How to use the mqtt protocol in windows phone.I got code from mqtt site which is an .net application and i am able to run that app successfully,but when i am trying to incorporate the same thing in windows phone i got 3 errors.
1)hashtable is not recognized so i substituted dictonary<>
2)tcpclient is not recognized...can anyone tell me some alternative
3)networkstream is not recognized...
so please can anyone suggest me some alternative for tcpclient and networkstream.
Basically we want to implement push notification without help of mpns in windows phone.

I believe that TCP sockets are now supported for Windows Phone 7 apps (since the Mango SDK update).
Check out http://msdn.microsoft.com/en-us/library/hh202858(VS.92).aspx for a sample and tutorial.
Good luck!

Related

Server socket on Windows Phone 8 and 8.1

I need to port an application to the Windows Phone platform. Is it possible to create server sockets on Windows Phone 8 and 8.1? All I've found is related with client side, like creating connections to remote machines. I can't find nothing the other way: The phone acting as the server.
Any help or confirmation on this will be truly appreciated! Thanks in advance!
You'll want to use the StreamSocketListener class.
It is just an opinion of mine, but when I consider my development experience with the Windows Phone I would say: NO. I don't think MS provide an API for that. Also I can't think about a Windows Phone App which acts as a server.
Thanks for downvoting without explanantion.
Just to back up my opinion:
http://msdn.microsoft.com/en-us/library/windows/apps/hh202874(v=vs.105).aspx
There it is very clear, that MS thinks about CLIENT sockets when using them.

windows phone 7 - How to search & connect to Bluetooth devices programatically

I want to create an application for windows phone 7 that can search for & connect to bluetooth devices. But Compact Framework of WM7 not exposing any API to handle Bluetooth while am also not able to connect with sockets as system.net.sockets not showing any class. Any one can help me to solve this problem. Thanks in advance.
In the current framework for Windows Phone 7 development there is no support for sockets and there is no API for BlueTooth, either. I doubt there will be any changes on this front before the Mango update (towards the end of this year: November-ish) and we should find out exactly what will be in Mango at MIX.

Publishing a MIDI source as a Bonjour service

I have written a VST/AU/RTAS synthesiser plugin for OSX and Windows that also has an iPhone equivalent. I would like to allow the two to communicate with each other over a local area network so that the iPhone app can be used to send MIDI controller data to the plugin. I plan to create a MIDI source on the iPhone and publish it as a Bonjour service so that the plugin running on OSX or Windows can find it and receive midi from it.
I have a couple of questions to ask about this:
1) Do I actually have to publish the MIDI source as a Bonjour service or does a coremidi host (running on iPhone) automatically publish itself?
2) Are there any code examples available that show how to do this sort of thing?
I have seen the following post but the answer to this only covers the client side, finding a Bonjour service but not the publishing side, and it transmits MIDI via OSC, and it only covers OSX but not Windows (I know, I'm not asking much! ;) )
How to send MIDI or OSC signals to a Mac application from my iOS application?
Cheers,
John.
AFAIK you'll have to publish the service yourself. NSNetService and NSNetServiceBrowser are the classes you need. Check out the companion guide. I found this article on Cocoa for Scientists particularly helpful in getting started. Both have some decent code samples. The Bonjour Browser is useful for testing.
The list of bonjour service types already has
apple-midi
and
imidi
But I think it's best to make up your own application-specific type name unless your app is plug-compatible with one of these services.

communicate between iphone and windows pc?

I want to write an app to communicate between the iPhone and a Windows pc. Where can I find more information on that particular communication?
Your best bet I beleive is to just use the network. If you're doing something nice and simple HTTP might even work for you. If you need to transfer files they NFS or FTP.
I found the following link:
Bonjour for .net
I tested the sample app and it communicates with my iPhone. I will digg more in that on the next day or tow and will inform you.

WiFi iPhone Application

im working on an iPhone application which requires communication between 2 devices through WiFi.
Can somebody please help me by providing a simple iphone application code for the same which is able to communicate data between the devices...i hv gone through the "witap application" available on the developers site but wasnt able to understand it...
please help..
There's a great 2-part tutorial at MacResearch:
Part One
Part Two
Use the Bonjour , let Device A as the server, and publish service via Bonjour; and in Device B,use the NSNetServiceBrowser to search the published service via device A in the same local network,and connect by socket to send data.
there is a demo here.download.And you can read this article go>>.It helped me before.