locked
StreamSocket KeepAlive

    Question

  • I am using Windows.Networking.Sockets.StreamSocket to work with a TCP connection.  The program communicates as expected, but I am not seeing any keepalive messages sent.  My code is something like this:

    Windows::Networking::Sockets::StreamSocket^ socket_ = ref new Windows::Networking::Sockets::StreamSocket();
    auto hn = ref new Windows::Networking::HostName(remote_host_name);
    socket_->Control->KeepAlive = true;
    run_sync(this->socket_->ConnectAsync(hn, port));

    Is there something else that I need to do to enable keep alive messages?
    Monday, December 17, 2012 5:23 PM

All replies