Exforsys
+ Reply to Thread
Results 1 to 3 of 3

handling tcp and udp simultaneoulsy

This is a discussion on handling tcp and udp simultaneoulsy within the C and C++ forums, part of the Programming Talk category; Hi, I have UDP client/server program which sends a video file from server to client. I want to send a ...

  1. #1
    itzsug is offline Junior Member Array
    Join Date
    May 2004
    Answers
    22

    handling tcp and udp simultaneoulsy

    Hi,

    I have UDP client/server program which sends a video file from server to client.
    I want to send a parameter from client to server after every 2048 bytes? How can i do this? The parameter is must, so i think sending parameter using TCP would be better.

    can we use tcp and udp in a client/server simultaneoulsy?

    please kindly suggest some examples?

    Thanks.

    from
    Jagadish


  2. #2
    dhee Guest

    Re:handling tcp and udp simultaneoulsy

    itzsug wrote:
    Hi,

    I have UDP client/server program which sends a video file from server to client.
    I want to send a parameter from client to server after every 2048 bytes? How can i do this? The parameter is must, so i think sending parameter using TCP would be better.

    can we use tcp and udp in a client/server simultaneoulsy?

    please kindly suggest some examples?

    Thanks.

    from
    Jagadish
    The currect way to do this is to havea message structured so that you send 2048 bytes in the
    udp stream followed by your magic token
    struct stream {
    char data[2048];
    int magic_token;
    };

    copy your data from the stream into this structure and send it over.
    \'man mmap\' if you think you cannot risk the latency of a copy operation.
    you can use tcp and udp but not within the same connection flow. You can have a separate tcp control connection to send these \'parameters\' or \'tokens\' but you will need to synchronize them and that\'ll be another problem to solve..

    dheeraj


  3. #3
    itzsug is offline Junior Member Array
    Join Date
    May 2004
    Answers
    22
    Thanks Dheeraj. The info was useful


    •    Sponsored Ads



Latest Article

Network Security Risk Assessment and Measurement

Read More...