c++/cx streamsocket RRS feed

  • Question

  • Hi,

    DatagramSocket sample don't show how to use DataReader for socket

    is there any samples?


    Wednesday, August 29, 2012 10:47 AM


All replies

  • The DatagramSocket sample and the StreamSocket sample are both available in C++. Both samples demonstrate using DataReaders to some extent (the DatagramSocket doesn't store it in a separate variable but directly uses the DataReader returned from DatagramSocketMessageReceivedEventArgs.GetDataReader())

    If this doesn't do what you need please be more specific about what you are trying to do, where you are stuck, and what you need help with.


    • Marked as answer by winstead Thursday, August 30, 2012 2:32 AM
    Wednesday, August 29, 2012 9:29 PM
  • thank U

    could I append a question

    how to change InputStreamOptions to partial

    in c#

    we could use this code

    dr.InputStreamOptions = InputStreamOptions.Partial;

    But in c++/cx

    I tried

    DataReader dr=ref new DataReader(Socket->InputStream)

    dr->InputStreamOptions=InputStreamOptions.  or InputStreamOptions->

    could not find anything

    Thursday, August 30, 2012 2:31 AM
  • The syntax is:

    dr->InputStreamOptions = InputStreamOptions::Partial;


    Thursday, August 30, 2012 2:55 AM