0

I am hoping that someone might be able to help me with some huge confusion I am running into. I am working on porting an open source library so that I can use it within Windows Phone 8. The three main areas that I have found which need to be refactored for Windows Phone are: Replace Timer/Thread functions with Task/Async calls Replace [Serializable] with.... I some articles save on this, just not remembering off the top of my head

And lastly, IP/UDP communications - specifically IPEndPoint and Socket.

Where I am getting confused is that I cannot seem to resolve IPEndPoint, even though from everything I can see online it is supposed to be supported.

http://msdn.microsoft.com/en-us/library/system.net.ipendpoint(v=vs.110).aspx http://social.msdn.microsoft.com/Forums/wpapps/en-US/fc99e3e7-c8d3-4b3f-bd2d-cc5bf9b5c56e/get-local-ip-address-on-wifi?forum=wpdevelop

And some other examples from SO which I do not have the links to.

What am I missing?

Should I be using something different than IPEndPoint?

FYI: I was originally porting this library to a PCL but I was reading something somewhere that said IPEndPoint was available in Windows Phone 8 so I created a new Windows Phone Class Library project for this code - which is giving me the same results anyways.

Justin Greywolf
  • 650
  • 7
  • 17
  • Are you `using System.Net;` so that you can see `IPEndPoint` and `using System.Net.Sockets;` so that you can see `Socket`? – Tawnos Apr 18 '14 at 19:22
  • http://msdn.microsoft.com/en-us/library/windowsphone/develop/windows.networking.endpointpair.aspx – Hans Passant Apr 18 '14 at 19:24

1 Answers1

0

The quick answer to my specific question is that IPEndPoint and Socket classes are only available with a Windows Phone 8/8.1 Silverlight application - Not sure why the difference there. So now that I have recreated my app as the Silverlight version I am able to resolve those references.

Once I have completed the work necessary to "migrate" this code to Windows Phone I will look into updating the code to use Windows.Networking as linked by Hans.

Justin Greywolf
  • 650
  • 7
  • 17