×

Loading...
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。
Ad by
  • 最优利率和cashback可以申请特批,好信用好收入offer更好。请点链接扫码加微信咨询,Scotiabank -- Nick Zhang 6478812600。

transfering voice and text data(mixed) via one UDP link

Hi there:
I am writing a program to implement both voice and text chat(voice and text data are mixed) among several computers via one UDP link. Both the voice and text data are variable length. The problem is that package(voice or text data) maybe be segemented through network before reaching the destination, and the arriving sequences of segemented package from different sources are unpredictable. How should I design the message structure or communication model?

Just like yahoo messenger, people can talk using Microphone and speaker of computers and at the same time, they can chat by inputing something using keyboard. If I send a voice package about 2Kbytes, there is 2 fields in the header of the package(the TYPE is voice, the SIZE of this package is 2K). But in the destination, this package maybe be segemented into several packages.Except for the package with header, I don't know the other packages whether they are voice or text packages.

Thanks a lot.
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / transfering voice and text data(mixed) via one UDP link
    Hi there:
    I am writing a program to implement both voice and text chat(voice and text data are mixed) among several computers via one UDP link. Both the voice and text data are variable length. The problem is that package(voice or text data) maybe be segemented through network before reaching the destination, and the arriving sequences of segemented package from different sources are unpredictable. How should I design the message structure or communication model?

    Just like yahoo messenger, people can talk using Microphone and speaker of computers and at the same time, they can chat by inputing something using keyboard. If I send a voice package about 2Kbytes, there is 2 fields in the header of the package(the TYPE is voice, the SIZE of this package is 2K). But in the destination, this package maybe be segemented into several packages.Except for the package with header, I don't know the other packages whether they are voice or text packages.

    Thanks a lot.
    • Hi, guy. If you have interests to discuss with me, pls send me email: freenet945@yahoo.com