BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJNATH Reference

pjturn-client, a sample TURN client

This is a simple, interactive TURN client application, with the following features:

  • DNS SRV resolution
  • TCP connection to TURN server
  • Optional fingerprint

This file is pjnath/src/pjturn-client/client_main.c.

Screenshot on WinXP:

pjturn_client.jpg

pjturn_client on WinXP

00001 /* $Id: client_main.c 3553 2011-05-05 06:14:19Z nanang $ */
00002 /* 
00003  * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
00004  * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 
00019  */
00020 #include <pjnath.h>
00021 #include <pjlib-util.h>
00022 #include <pjlib.h>
00023 
00024 
00025 #define THIS_FILE       "client_main.c"
00026 #define LOCAL_PORT      1998
00027 #define BANDWIDTH       64                  /* -1 to disable */
00028 #define LIFETIME        600                 /* -1 to disable */
00029 #define REQ_TRANSPORT   -1                  /* 0: udp, 1: tcp, -1: disable */
00030 #define REQ_PORT_PROPS  -1                  /* -1 to disable */
00031 #define REQ_IP          0                   /* IP address string */
00032 
00033 //#define OPTIONS               PJ_STUN_NO_AUTHENTICATE
00034 #define OPTIONS         0
00035 
00036 
00037 struct peer
00038 {
00039     pj_stun_sock   *stun_sock;
00040     pj_sockaddr     mapped_addr;
00041 };
00042 
00043 
00044 static struct global
00045 {
00046     pj_caching_pool      cp;
00047     pj_pool_t           *pool;
00048     pj_stun_config       stun_config;
00049     pj_thread_t         *thread;
00050     pj_bool_t            quit;
00051 
00052     pj_dns_resolver     *resolver;
00053 
00054     pj_turn_sock        *relay;
00055     pj_sockaddr          relay_addr;
00056 
00057     struct peer          peer[2];
00058 } g;
00059 
00060 static struct options
00061 {
00062     pj_bool_t    use_tcp;
00063     char        *srv_addr;
00064     char        *srv_port;
00065     char        *realm;
00066     char        *user_name;
00067     char        *password;
00068     pj_bool_t    use_fingerprint;
00069     char        *stun_server;
00070     char        *nameserver;
00071 } o;
00072 
00073 
00074 static int worker_thread(void *unused);
00075 static void turn_on_rx_data(pj_turn_sock *relay,
00076                             void *pkt,
00077                             unsigned pkt_len,
00078                             const pj_sockaddr_t *peer_addr,
00079                             unsigned addr_len);
00080 static void turn_on_state(pj_turn_sock *relay, pj_turn_state_t old_state,
00081                           pj_turn_state_t new_state);
00082 static pj_bool_t stun_sock_on_status(pj_stun_sock *stun_sock, 
00083                                      pj_stun_sock_op op,
00084                                      pj_status_t status);
00085 static pj_bool_t stun_sock_on_rx_data(pj_stun_sock *stun_sock,
00086                                       void *pkt,
00087                                       unsigned pkt_len,
00088                                       const pj_sockaddr_t *src_addr,
00089                                       unsigned addr_len);
00090 
00091 
00092 static void my_perror(const char *title, pj_status_t status)
00093 {
00094     char errmsg[PJ_ERR_MSG_SIZE];
00095     pj_strerror(status, errmsg, sizeof(errmsg));
00096 
00097     PJ_LOG(3,(THIS_FILE, "%s: %s", title, errmsg));
00098 }
00099 
00100 #define CHECK(expr)     status=expr; \
00101                         if (status!=PJ_SUCCESS) { \
00102                             my_perror(#expr, status); \
00103                             return status; \
00104                         }
00105 
00106 static int init()
00107 {
00108     int i;
00109     pj_status_t status;
00110 
00111     CHECK( pj_init() );
00112     CHECK( pjlib_util_init() );
00113     CHECK( pjnath_init() );
00114 
00115     /* Check that server is specified */
00116     if (!o.srv_addr) {
00117         printf("Error: server must be specified\n");
00118         return PJ_EINVAL;
00119     }
00120 
00121     pj_caching_pool_init(&g.cp, &pj_pool_factory_default_policy, 0);
00122 
00123     g.pool = pj_pool_create(&g.cp.factory, "main", 1000, 1000, NULL);
00124 
00125     /* Init global STUN config */
00126     pj_stun_config_init(&g.stun_config, &g.cp.factory, 0, NULL, NULL);
00127 
00128     /* Create global timer heap */
00129     CHECK( pj_timer_heap_create(g.pool, 1000, &g.stun_config.timer_heap) );
00130 
00131     /* Create global ioqueue */
00132     CHECK( pj_ioqueue_create(g.pool, 16, &g.stun_config.ioqueue) );
00133 
00134     /* 
00135      * Create peers
00136      */
00137     for (i=0; i<(int)PJ_ARRAY_SIZE(g.peer); ++i) {
00138         pj_stun_sock_cb stun_sock_cb;
00139         char name[] = "peer0";
00140         pj_uint16_t port;
00141         pj_stun_sock_cfg ss_cfg;
00142         pj_str_t server;
00143 
00144         pj_bzero(&stun_sock_cb, sizeof(stun_sock_cb));
00145         stun_sock_cb.on_rx_data = &stun_sock_on_rx_data;
00146         stun_sock_cb.on_status = &stun_sock_on_status;
00147 
00148         g.peer[i].mapped_addr.addr.sa_family = pj_AF_INET();
00149 
00150         pj_stun_sock_cfg_default(&ss_cfg);
00151 #if 1
00152         /* make reading the log easier */
00153         ss_cfg.ka_interval = 300;
00154 #endif
00155 
00156         name[strlen(name)-1] = '0'+i;
00157         status = pj_stun_sock_create(&g.stun_config, name, pj_AF_INET(), 
00158                                      &stun_sock_cb, &ss_cfg,
00159                                      &g.peer[i], &g.peer[i].stun_sock);
00160         if (status != PJ_SUCCESS) {
00161             my_perror("pj_stun_sock_create()", status);
00162             return status;
00163         }
00164 
00165         if (o.stun_server) {
00166             server = pj_str(o.stun_server);
00167             port = PJ_STUN_PORT;
00168         } else {
00169             server = pj_str(o.srv_addr);
00170             port = (pj_uint16_t)(o.srv_port?atoi(o.srv_port):PJ_STUN_PORT);
00171         }
00172         status = pj_stun_sock_start(g.peer[i].stun_sock, &server, 
00173                                     port,  NULL);
00174         if (status != PJ_SUCCESS) {
00175             my_perror("pj_stun_sock_start()", status);
00176             return status;
00177         }
00178     }
00179 
00180     /* Start the worker thread */
00181     CHECK( pj_thread_create(g.pool, "stun", &worker_thread, NULL, 0, 0, &g.thread) );
00182 
00183 
00184     return PJ_SUCCESS;
00185 }
00186 
00187 
00188 static int client_shutdown()
00189 {
00190     unsigned i;
00191 
00192     if (g.thread) {
00193         g.quit = 1;
00194         pj_thread_join(g.thread);
00195         pj_thread_destroy(g.thread);
00196         g.thread = NULL;
00197     }
00198     if (g.relay) {
00199         pj_turn_sock_destroy(g.relay);
00200         g.relay = NULL;
00201     }
00202     for (i=0; i<PJ_ARRAY_SIZE(g.peer); ++i) {
00203         if (g.peer[i].stun_sock) {
00204             pj_stun_sock_destroy(g.peer[i].stun_sock);
00205             g.peer[i].stun_sock = NULL;
00206         }
00207     }
00208     if (g.stun_config.timer_heap) {
00209         pj_timer_heap_destroy(g.stun_config.timer_heap);
00210         g.stun_config.timer_heap = NULL;
00211     }
00212     if (g.stun_config.ioqueue) {
00213         pj_ioqueue_destroy(g.stun_config.ioqueue);
00214         g.stun_config.ioqueue = NULL;
00215     }
00216     if (g.pool) {
00217         pj_pool_release(g.pool);
00218         g.pool = NULL;
00219     }
00220     pj_pool_factory_dump(&g.cp.factory, PJ_TRUE);
00221     pj_caching_pool_destroy(&g.cp);
00222 
00223     return PJ_SUCCESS;
00224 }
00225 
00226 
00227 static int worker_thread(void *unused)
00228 {
00229     PJ_UNUSED_ARG(unused);
00230 
00231     while (!g.quit) {
00232         const pj_time_val delay = {0, 10};
00233 
00234         /* Poll ioqueue for the TURN client */
00235         pj_ioqueue_poll(g.stun_config.ioqueue, &delay);
00236 
00237         /* Poll the timer heap */
00238         pj_timer_heap_poll(g.stun_config.timer_heap, NULL);
00239 
00240     }
00241 
00242     return 0;
00243 }
00244 
00245 static pj_status_t create_relay(void)
00246 {
00247     pj_turn_sock_cb rel_cb;
00248     pj_stun_auth_cred cred;
00249     pj_str_t srv;
00250     pj_status_t status;
00251 
00252     if (g.relay) {
00253         PJ_LOG(1,(THIS_FILE, "Relay already created"));
00254         return -1;
00255     }
00256 
00257     /* Create DNS resolver if configured */
00258     if (o.nameserver) {
00259         pj_str_t ns = pj_str(o.nameserver);
00260 
00261         status = pj_dns_resolver_create(&g.cp.factory, "resolver", 0, 
00262                                         g.stun_config.timer_heap, 
00263                                         g.stun_config.ioqueue, &g.resolver);
00264         if (status != PJ_SUCCESS) {
00265             PJ_LOG(1,(THIS_FILE, "Error creating resolver (err=%d)", status));
00266             return status;
00267         }
00268 
00269         status = pj_dns_resolver_set_ns(g.resolver, 1, &ns, NULL);
00270         if (status != PJ_SUCCESS) {
00271             PJ_LOG(1,(THIS_FILE, "Error configuring nameserver (err=%d)", status));
00272             return status;
00273         }
00274     }
00275 
00276     pj_bzero(&rel_cb, sizeof(rel_cb));
00277     rel_cb.on_rx_data = &turn_on_rx_data;
00278     rel_cb.on_state = &turn_on_state;
00279     CHECK( pj_turn_sock_create(&g.stun_config, pj_AF_INET(), 
00280                                (o.use_tcp? PJ_TURN_TP_TCP : PJ_TURN_TP_UDP),
00281                                &rel_cb, 0,
00282                                NULL, &g.relay) );
00283 
00284     if (o.user_name) {
00285         pj_bzero(&cred, sizeof(cred));
00286         cred.type = PJ_STUN_AUTH_CRED_STATIC;
00287         cred.data.static_cred.realm = pj_str(o.realm);
00288         cred.data.static_cred.username = pj_str(o.user_name);
00289         cred.data.static_cred.data_type = PJ_STUN_PASSWD_PLAIN;
00290         cred.data.static_cred.data = pj_str(o.password);
00291         //cred.data.static_cred.nonce = pj_str(o.nonce);
00292     } else {
00293         PJ_LOG(2,(THIS_FILE, "Warning: no credential is set"));
00294     }
00295 
00296     srv = pj_str(o.srv_addr);
00297     CHECK(pj_turn_sock_alloc(g.relay,                            /* the relay */
00298                             &srv,                                /* srv addr */
00299                             (o.srv_port?atoi(o.srv_port):PJ_STUN_PORT),/* def port */
00300                             g.resolver,                          /* resolver */
00301                             (o.user_name?&cred:NULL),            /* credential */
00302                             NULL)                                /* alloc param */
00303                             );
00304 
00305     return PJ_SUCCESS;
00306 }
00307 
00308 static void destroy_relay(void)
00309 {
00310     if (g.relay) {
00311         pj_turn_sock_destroy(g.relay);
00312     }
00313 }
00314 
00315 
00316 static void turn_on_rx_data(pj_turn_sock *relay,
00317                             void *pkt,
00318                             unsigned pkt_len,
00319                             const pj_sockaddr_t *peer_addr,
00320                             unsigned addr_len)
00321 {
00322     char addrinfo[80];
00323 
00324     pj_sockaddr_print(peer_addr, addrinfo, sizeof(addrinfo), 3);
00325 
00326     PJ_LOG(3,(THIS_FILE, "Client received %d bytes data from %s: %.*s",
00327               pkt_len, addrinfo, pkt_len, pkt));
00328 }
00329 
00330 
00331 static void turn_on_state(pj_turn_sock *relay, pj_turn_state_t old_state,
00332                           pj_turn_state_t new_state)
00333 {
00334     PJ_LOG(3,(THIS_FILE, "State %s --> %s", pj_turn_state_name(old_state), 
00335               pj_turn_state_name(new_state)));
00336 
00337     if (new_state == PJ_TURN_STATE_READY) {
00338         pj_turn_session_info info;
00339         pj_turn_sock_get_info(relay, &info);
00340         pj_memcpy(&g.relay_addr, &info.relay_addr, sizeof(pj_sockaddr));
00341     } else if (new_state > PJ_TURN_STATE_READY && g.relay) {
00342         PJ_LOG(3,(THIS_FILE, "Relay shutting down.."));
00343         g.relay = NULL;
00344     }
00345 }
00346 
00347 static pj_bool_t stun_sock_on_status(pj_stun_sock *stun_sock, 
00348                                      pj_stun_sock_op op,
00349                                      pj_status_t status)
00350 {
00351     struct peer *peer = (struct peer*) pj_stun_sock_get_user_data(stun_sock);
00352 
00353     if (status == PJ_SUCCESS) {
00354         PJ_LOG(4,(THIS_FILE, "peer%d: %s success", peer-g.peer,
00355                   pj_stun_sock_op_name(op)));
00356     } else {
00357         char errmsg[PJ_ERR_MSG_SIZE];
00358         pj_strerror(status, errmsg, sizeof(errmsg));
00359         PJ_LOG(1,(THIS_FILE, "peer%d: %s error: %s", peer-g.peer,
00360                   pj_stun_sock_op_name(op), errmsg));
00361         return PJ_FALSE;
00362     }
00363 
00364     if (op==PJ_STUN_SOCK_BINDING_OP || op==PJ_STUN_SOCK_KEEP_ALIVE_OP) {
00365         pj_stun_sock_info info;
00366         int cmp;
00367 
00368         pj_stun_sock_get_info(stun_sock, &info);
00369         cmp = pj_sockaddr_cmp(&info.mapped_addr, &peer->mapped_addr);
00370 
00371         if (cmp) {
00372             char straddr[PJ_INET6_ADDRSTRLEN+10];
00373 
00374             pj_sockaddr_cp(&peer->mapped_addr, &info.mapped_addr);
00375             pj_sockaddr_print(&peer->mapped_addr, straddr, sizeof(straddr), 3);
00376             PJ_LOG(3,(THIS_FILE, "peer%d: STUN mapped address is %s",
00377                       peer-g.peer, straddr));
00378         }
00379     }
00380 
00381     return PJ_TRUE;
00382 }
00383 
00384 static pj_bool_t stun_sock_on_rx_data(pj_stun_sock *stun_sock,
00385                                       void *pkt,
00386                                       unsigned pkt_len,
00387                                       const pj_sockaddr_t *src_addr,
00388                                       unsigned addr_len)
00389 {
00390     struct peer *peer = (struct peer*) pj_stun_sock_get_user_data(stun_sock);
00391     char straddr[PJ_INET6_ADDRSTRLEN+10];
00392 
00393     ((char*)pkt)[pkt_len] = '\0';
00394 
00395     pj_sockaddr_print(src_addr, straddr, sizeof(straddr), 3);
00396     PJ_LOG(3,(THIS_FILE, "peer%d: received %d bytes data from %s: %s",
00397               peer-g.peer, pkt_len, straddr, (char*)pkt));
00398 
00399     return PJ_TRUE;
00400 }
00401 
00402 
00403 static void menu(void)
00404 {
00405     pj_turn_session_info info;
00406     char client_state[20], relay_addr[80], peer0_addr[80], peer1_addr[80];
00407 
00408     if (g.relay) {
00409         pj_turn_sock_get_info(g.relay, &info);
00410         strcpy(client_state, pj_turn_state_name(info.state));
00411         if (info.state >= PJ_TURN_STATE_READY)
00412             pj_sockaddr_print(&info.relay_addr, relay_addr, sizeof(relay_addr), 3);
00413         else
00414             strcpy(relay_addr, "0.0.0.0:0");
00415     } else {
00416         strcpy(client_state, "NULL");
00417         strcpy(relay_addr, "0.0.0.0:0");
00418     }
00419 
00420     pj_sockaddr_print(&g.peer[0].mapped_addr, peer0_addr, sizeof(peer0_addr), 3);
00421     pj_sockaddr_print(&g.peer[1].mapped_addr, peer1_addr, sizeof(peer1_addr), 3);
00422 
00423 
00424     puts("\n");
00425     puts("+=====================================================================+");
00426     puts("|             CLIENT                 |             PEER-0             |");
00427     puts("|                                    |                                |");
00428     printf("| State     : %-12s           | Address: %-21s |\n",
00429            client_state, peer0_addr);
00430     printf("| Relay addr: %-21s  |                                |\n",
00431            relay_addr);
00432     puts("|                                    | 0  Send data to relay address  |");
00433     puts("| a      Allocate relay              |                                |");
00434     puts("| p,pp   Set permission for peer 0/1 +--------------------------------+");
00435     puts("| s,ss   Send data to peer 0/1       |             PEER-1             |");
00436     puts("| b,bb   BindChannel to peer 0/1     |                                |");
00437     printf("| x      Delete allocation           | Address: %-21s |\n",
00438           peer1_addr);
00439     puts("+------------------------------------+                                |");
00440     puts("| q  Quit                  d  Dump   | 1  Send data to relay adderss  |");
00441     puts("+------------------------------------+--------------------------------+");
00442     printf(">>> ");
00443     fflush(stdout);
00444 }
00445 
00446 
00447 static void console_main(void)
00448 {
00449     while (!g.quit) {
00450         char input[32];
00451         struct peer *peer;
00452         pj_status_t status;
00453 
00454         menu();
00455 
00456         if (fgets(input, sizeof(input), stdin) == NULL)
00457             break;
00458         
00459         switch (input[0]) {
00460         case 'a':
00461             create_relay();
00462             break;
00463         case 'd':
00464             pj_pool_factory_dump(&g.cp.factory, PJ_TRUE);
00465             break;
00466         case 's':
00467             if (g.relay == NULL) {
00468                 puts("Error: no relay");
00469                 continue;
00470             }
00471             if (input[1]!='s')
00472                 peer = &g.peer[0];
00473             else
00474                 peer = &g.peer[1];
00475 
00476             strcpy(input, "Hello from client");
00477             status = pj_turn_sock_sendto(g.relay, (const pj_uint8_t*)input, 
00478                                         strlen(input)+1, 
00479                                         &peer->mapped_addr, 
00480                                         pj_sockaddr_get_len(&peer->mapped_addr));
00481             if (status != PJ_SUCCESS)
00482                 my_perror("turn_udp_sendto() failed", status);
00483             break;
00484         case 'b':
00485             if (g.relay == NULL) {
00486                 puts("Error: no relay");
00487                 continue;
00488             }
00489             if (input[1]!='b')
00490                 peer = &g.peer[0];
00491             else
00492                 peer = &g.peer[1];
00493 
00494             status = pj_turn_sock_bind_channel(g.relay, &peer->mapped_addr,
00495                                               pj_sockaddr_get_len(&peer->mapped_addr));
00496             if (status != PJ_SUCCESS)
00497                 my_perror("turn_udp_bind_channel() failed", status);
00498             break;
00499         case 'p':
00500             if (g.relay == NULL) {
00501                 puts("Error: no relay");
00502                 continue;
00503             }
00504             if (input[1]!='p')
00505                 peer = &g.peer[0];
00506             else
00507                 peer = &g.peer[1];
00508 
00509             status = pj_turn_sock_set_perm(g.relay, 1, &peer->mapped_addr, 1);
00510             if (status != PJ_SUCCESS)
00511                 my_perror("pj_turn_sock_set_perm() failed", status);
00512             break;
00513         case 'x':
00514             if (g.relay == NULL) {
00515                 puts("Error: no relay");
00516                 continue;
00517             }
00518             destroy_relay();
00519             break;
00520         case '0':
00521         case '1':
00522             if (g.relay == NULL) {
00523                 puts("No relay");
00524                 break;
00525             }
00526             peer = &g.peer[input[0]-'0'];
00527             sprintf(input, "Hello from peer%d", input[0]-'0');
00528             pj_stun_sock_sendto(peer->stun_sock, NULL, input, strlen(input)+1, 0,
00529                                 &g.relay_addr, pj_sockaddr_get_len(&g.relay_addr));
00530             break;
00531         case 'q':
00532             g.quit = PJ_TRUE;
00533             break;
00534         }
00535     }
00536 }
00537 
00538 
00539 static void usage(void)
00540 {
00541     puts("Usage: pjturn_client TURN-SERVER [OPTIONS]");
00542     puts("");
00543     puts("where TURN-SERVER is \"host[:port]\"");
00544     puts("");
00545     puts("and OPTIONS:");
00546     puts(" --tcp, -T             Use TCP to connect to TURN server");
00547     puts(" --realm, -r REALM     Set realm of the credential to REALM");
00548     puts(" --username, -u UID    Set username of the credential to UID");
00549     puts(" --password, -p PASSWD Set password of the credential to PASSWD");
00550     puts(" --fingerprint, -F     Use fingerprint for outgoing requests");
00551     puts(" --stun-srv, -S  NAME  Use this STUN srv instead of TURN for Binding discovery");
00552     puts(" --nameserver, -N IP   Activate DNS SRV, use this DNS server");
00553     puts(" --help, -h");
00554 }
00555 
00556 int main(int argc, char *argv[])
00557 {
00558     struct pj_getopt_option long_options[] = {
00559         { "realm",      1, 0, 'r'},
00560         { "username",   1, 0, 'u'},
00561         { "password",   1, 0, 'p'},
00562         { "fingerprint",0, 0, 'F'},
00563         { "tcp",        0, 0, 'T'},
00564         { "help",       0, 0, 'h'},
00565         { "stun-srv",   1, 0, 'S'},
00566         { "nameserver", 1, 0, 'N'}
00567     };
00568     int c, opt_id;
00569     char *pos;
00570     pj_status_t status;
00571 
00572     while((c=pj_getopt_long(argc,argv, "r:u:p:S:N:hFT", long_options, &opt_id))!=-1) {
00573         switch (c) {
00574         case 'r':
00575             o.realm = pj_optarg;
00576             break;
00577         case 'u':
00578             o.user_name = pj_optarg;
00579             break;
00580         case 'p':
00581             o.password = pj_optarg;
00582             break;
00583         case 'h':
00584             usage();
00585             return 0;
00586         case 'F':
00587             o.use_fingerprint = PJ_TRUE;
00588             break;
00589         case 'T':
00590             o.use_tcp = PJ_TRUE;
00591             break;
00592         case 'S':
00593             o.stun_server = pj_optarg;
00594             break;
00595         case 'N':
00596             o.nameserver = pj_optarg;
00597             break;
00598         default:
00599             printf("Argument \"%s\" is not valid. Use -h to see help",
00600                    argv[pj_optind]);
00601             return 1;
00602         }
00603     }
00604 
00605     if (pj_optind == argc) {
00606         puts("Error: TARGET is needed");
00607         usage();
00608         return 1;
00609     }
00610 
00611     if ((pos=pj_ansi_strchr(argv[pj_optind], ':')) != NULL) {
00612         o.srv_addr = argv[pj_optind];
00613         *pos = '\0';
00614         o.srv_port = pos+1;
00615     } else {
00616         o.srv_addr = argv[pj_optind];
00617     }
00618 
00619     if ((status=init()) != 0)
00620         goto on_return;
00621     
00622     //if ((status=create_relay()) != 0)
00623     //  goto on_return;
00624     
00625     console_main();
00626 
00627 on_return:
00628     client_shutdown();
00629     return status ? 1 : 0;
00630 }
00631 

.

 


PJNATH - Open Source NAT traversal helper library supporting STUN, TURN, and ICE
Copyright (C) 2006-2009 Teluu Inc.