Using Pjnath for NAT traversal

SG
saleem gagguturu
Sat, Jun 1, 2024 4:53 PM

Hi

I'm planning on using pjsip for a multiplayer game I'm building.

I'm having a look at the icedemo.c file to understand the process of using the ICE library and I have two questions.

Question 1
The demo file demonstrates communication between one other application, but in order to communicate with multiple applications, should I create multiple instances of pj_ice_strans?

For example, in my game if I'm playing with two other remote players, I should create two ICE stream transports using the pj_ice_strans_create method right?
Then I encode the first session and send it to player 1, and encode the second session and send to player 2?

Question 2
Is it possible to force all traffic to go through a relay (TURN) for added privacy?

Thanks very much for the library.

Hi I'm planning on using pjsip for a multiplayer game I'm building. I'm having a look at the icedemo.c file to understand the process of using the ICE library and I have two questions. Question 1 The demo file demonstrates communication between one other application, but in order to communicate with multiple applications, should I create multiple instances of pj_ice_strans? For example, in my game if I'm playing with two other remote players, I should create two ICE stream transports using the pj_ice_strans_create method right? Then I encode the first session and send it to player 1, and encode the second session and send to player 2? Question 2 Is it possible to force all traffic to go through a relay (TURN) for added privacy? Thanks very much for the library.