locked
Wndows Store app - StreamSockets connection RRS feed

  • Question

  • How can i determine if a StreamSocket is connected to a server? Is there a method i can use?
    Thursday, August 8, 2013 1:44 AM

Answers

  • Use Wireshark on both the client and the server to ensure that the packets are being sent by the client and that the packets are being received by the server.  If so, then you can run ETW network tracing to determine the exact process that is consuming those packets.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by kalel111 Tuesday, August 13, 2013 6:17 AM
    Monday, August 12, 2013 5:14 PM
    Moderator

All replies

  • Your question begs more questions:

    1) This streamsocket - this exists in your code, right?  You would know if the socket is able to send/receive information.  TCP/IP is a connection-based protocol, it will do a three-way handshake to establish connection. 

    2) If you're asking if a server can tell that it's a streamsocket, that's only if the data sent by the streamsocket says so.

    Is there something else you were asking?


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, August 8, 2013 3:07 PM
    Moderator
  • OkAY on my server.  I try sending data using the stream of a connected socket. But the data still sends without errors. When i know full well that the client app was closed , so the socket should have been also closed.

    How can my server check to see if the socket is really active or not. Because simply trying to send data to it doesnt work.

    Thursday, August 8, 2013 3:13 PM
  • No one knows???????
    Monday, August 12, 2013 4:30 PM
  • Use Wireshark on both the client and the server to ensure that the packets are being sent by the client and that the packets are being received by the server.  If so, then you can run ETW network tracing to determine the exact process that is consuming those packets.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    • Marked as answer by kalel111 Tuesday, August 13, 2013 6:17 AM
    Monday, August 12, 2013 5:14 PM
    Moderator