locked
How can I close DatagramSocket? RRS feed

  • Question

  • I have DatagramSocket in my WP 8 project. I can open it and receive data but there is no Close() method even though MSDN says it exists. How can I close the socket?

    If I go to the definition of DatagramSocket I see this text at the top of the page:

    #region Assembly Windows.winmd, v255.255.255.255
    // C:\Program Files (x86)\Windows Phone Kits\8.0\\Windows Metadata\Windows.winmd
    #endregion
    The version number seems a bit weird. Am I using wrong assembly?
    Wednesday, January 28, 2015 4:55 PM

Answers

  • If you are programming with C#, you can call datagramSocket.Dispose(), that is the C# projection of Close().
    • Marked as answer by PaulDotNet Thursday, January 29, 2015 5:36 AM
    Thursday, January 29, 2015 12:47 AM