/[resiprocate]/main/reTurn/reTurnServer.cxx
ViewVC logotype

Diff of /main/reTurn/reTurnServer.cxx

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 10086 by dpocock, Wed Mar 27 21:33:05 2013 UTC revision 10468 by Dpocock, Wed Sep 11 09:56:05 2013 UTC
# Line 97  Line 97 
97        boost::shared_ptr<reTurn::UdpServer> a2p1StunUdpServer;        boost::shared_ptr<reTurn::UdpServer> a2p1StunUdpServer;
98        boost::shared_ptr<reTurn::UdpServer> a2p2StunUdpServer;        boost::shared_ptr<reTurn::UdpServer> a2p2StunUdpServer;
99    
100    #ifdef USE_IPV6
101          boost::shared_ptr<reTurn::UdpServer> udpV6TurnServer;
102          boost::shared_ptr<reTurn::TcpServer> tcpV6TurnServer;
103          boost::shared_ptr<reTurn::TlsServer> tlsV6TurnServer;
104    #endif
105    
106        // The one and only RequestHandler - if altStunPort is non-zero, then assume RFC3489 support is enabled and pass settings to request handler        // The one and only RequestHandler - if altStunPort is non-zero, then assume RFC3489 support is enabled and pass settings to request handler
107        reTurn::RequestHandler requestHandler(turnManager,        reTurn::RequestHandler requestHandler(turnManager,
108           reTurnConfig.mAltStunPort != 0 ? &reTurnConfig.mTurnAddress : 0,           reTurnConfig.mAltStunPort != 0 ? &reTurnConfig.mTurnAddress : 0,
# Line 108  Line 114 
114        tcpTurnServer.reset(new reTurn::TcpServer(ioService, requestHandler, reTurnConfig.mTurnAddress, reTurnConfig.mTurnPort));        tcpTurnServer.reset(new reTurn::TcpServer(ioService, requestHandler, reTurnConfig.mTurnAddress, reTurnConfig.mTurnPort));
115        tlsTurnServer.reset(new reTurn::TlsServer(ioService, requestHandler, reTurnConfig.mTurnAddress, reTurnConfig.mTlsTurnPort));        tlsTurnServer.reset(new reTurn::TlsServer(ioService, requestHandler, reTurnConfig.mTurnAddress, reTurnConfig.mTlsTurnPort));
116    
117    #ifdef USE_IPV6
118          udpV6TurnServer.reset(new reTurn::UdpServer(ioService, requestHandler, reTurnConfig.mTurnV6Address, reTurnConfig.mTurnPort));
119          tcpV6TurnServer.reset(new reTurn::TcpServer(ioService, requestHandler, reTurnConfig.mTurnV6Address, reTurnConfig.mTurnPort));
120          tlsV6TurnServer.reset(new reTurn::TlsServer(ioService, requestHandler, reTurnConfig.mTurnV6Address, reTurnConfig.mTlsTurnPort));
121    #endif
122    
123        if(reTurnConfig.mAltStunPort != 0) // if alt stun port is non-zero, then RFC3489 support is enabled        if(reTurnConfig.mAltStunPort != 0) // if alt stun port is non-zero, then RFC3489 support is enabled
124        {        {
125           a1p2StunUdpServer.reset(new reTurn::UdpServer(ioService, requestHandler, reTurnConfig.mTurnAddress, reTurnConfig.mAltStunPort));           a1p2StunUdpServer.reset(new reTurn::UdpServer(ioService, requestHandler, reTurnConfig.mTurnAddress, reTurnConfig.mAltStunPort));
# Line 126  Line 138 
138        tcpTurnServer->start();        tcpTurnServer->start();
139        tlsTurnServer->start();        tlsTurnServer->start();
140    
141    #ifdef USE_IPV6
142          udpV6TurnServer->start();
143          tcpV6TurnServer->start();
144          tlsV6TurnServer->start();
145    #endif
146    
147        // Drop privileges (can do this now that sockets are bound)        // Drop privileges (can do this now that sockets are bound)
148        if(!reTurnConfig.mRunAsUser.empty())        if(!reTurnConfig.mRunAsUser.empty())
149        {        {

Legend:
Removed from v.10086  
changed lines
  Added in v.10468

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.27