locked
Sending incoming stream data to other ip adress in network RRS feed

  • Question

  • Hello,

    I have a video encoder which sends data over a http stream in my local network. I want my application to receive this data as a stream and send the packages immediately to any other device in my LAN. 

    I'm wondering which type of connection I should use. The video encoder for sure sends the data continuously (camera feed). So the packages should get send all the time.

    Is the TcpClient the way to go?

    All the best,

    Jannick

    Wednesday, April 29, 2020 6:49 AM

All replies

  • Hi JannickL,

    Thank you for posting here.

    Asynchronous sockets seem to meet your requirements.

    Asynchronous Client Socket Example

    Asynchronous Server Socket Example

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 29, 2020 8:28 AM
  • Hi,

    so I took a look on your posted async client example and implemented it.

    I'm a now able to send a message and receive a bad request error from the server - so the connection itself works.

    My video decoder does not offer any api (or documentation). However I can see that there is network traffic: 

    Is there a way to just receive data from from the server without sending a request message? When I just open the socket and call BeginReceive there is no incoming data.

    The code you have mentioned displays a received string after sending a request to the server. In my case i want to continuously receive the incoming stream.

    All the best,

    Jannick




    • Edited by JannickL Thursday, April 30, 2020 11:13 AM
    Thursday, April 30, 2020 11:11 AM
  • Hi JannickL,

    That example is used to transfer data between the client and the server, but in this issue, we need to continuously obtain data from the video encoder first, I have no idea about this.

    Can you contact its manufacturer? Maybe they have a way.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, May 5, 2020 1:15 AM