C++/WinRT TCP Client question

David Hoffman 121 Reputation points
2021-09-09T13:38:34.987+00:00

In order to receive data from the server, do I need to place the DataReader inside a socket listener function that can call itself? Thanks.

Universal Windows Platform (UWP)
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,601 questions
{count} votes

Accepted answer
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,861 Reputation points
    2021-09-13T05:34:31.507+00:00

    Hello, Welcome to Micorosoft Q&A,

    In order to receive data from the server, do I need to place the DataReader inside a socket listener function that can call itself?

    Sure, you need to place DataReader in to OnConnection event and use receiving-loop block to reader InputStream for more detail please refer to code sample here.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful