Changes between Version 8 and Version 9 of pjsip-doc/endpoint


Ignore:
Timestamp:
Jun 17, 2016 4:35:06 AM (3 years ago)
Author:
ming
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • pjsip-doc/endpoint

    v8 v9  
    9090There is no real use of the ​Transport ID, except to create userless account (with ​Account.create(), as will be explained later), and perhaps to display the list of transports to user if the application wants it. 
    9191 
     92Creating A Secure Transport (TLS) 
     93-------------------------------------------------- 
     94To create a TLS transport, you can use the same method as above. You can further customize the TLS transport, such as setting the certificate file, or selecting the ciphers used, by modifying the field TransportConfig.tlsConfig. 
     95 
     96.. code-block:: c++ 
     97 
     98    try { 
     99        TransportConfig tcfg; 
     100        tcfg.port = 5061; 
     101        // Optional, set CA/certificate/private key files. 
     102        // tcfg.tlsConfig.CaListFile = "ca.crt"; 
     103        // tcfg.tlsConfig.certFile = "cert.crt"; 
     104        // tcfg.tlsConfig.privKeyFile = "priv.key"; 
     105        // Optional, set ciphers. You can select a certain cipher/rearrange the order of ciphers here. 
     106        // tcfg.ciphers = ep->utilSslGetAvailableCiphers(); 
     107        TransportId tid = ep->transportCreate(PJSIP_TRANSPORT_TLS, tcfg); 
     108    } catch(Error& err) { 
     109        cout << "Transport creation error: " << err.info() << endl; 
     110    } 
     111 
     112 
    92113Starting the Library 
    93114--------------------