V
V
vvsh2012-08-27 13:12:20
Java
vvsh, 2012-08-27 13:12:20

how to properly transfer audio between two clients?

is the correct way to transfer audio between clients:

1) the first client makes a request to the server via tcp protocol
2) the server checks if the second client is available:
a) sends the second client a request to confirm the call and the address (InetAddress) of the first client
b) the second client confirms it and sends an acknowledgment to the server
c) the server sends the address (InetAddress) of the second client to the first client.
3) the client starts transmitting packets (DatagramPacket) via DatagramSocket directly to

the second client. In point 3, the question arises: is it correct to transmit packets directly or is it better to make an intermediate server?
Thank you

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vvsh, 2012-08-27
@vvsh

it’s probably easier to do with tcp, I tried it, but it turns out a big delay ...

B
barker, 2012-08-28
@barker

The above unsubscribed ones, including: there should not be any tcp when transmitting audio / video! If it means real-time transmission/broadcasting, of course. For obvious reasons, only udp should be used.

E
Evengard, 2012-08-27
@Evengard

It's easier to do it through an intermediate server if you don't want to suffer with NAT transversal.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question