Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
14 years ago

May I use tcp and udp simultaneously within a iniche stack

May I use tcp and udp simultaneously within a iniche stack?

how to implement? //create two task for each like the simple socket server?

thanks a lot for your help!

3 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I have implement two tcp task,and it works well.

    next: implement a tcp task and a udp task.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Sure, you can.

    What's the problem? If you already implemented two tcp tasks, you only need to change one socket from SOCK_STREAM to SOCK_DGRAM
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    yes. I change the tcp socket to sock_DGRAM.

    and I have implemented 1 tcp task and 1 udp task. and they worked well.