|
11 | 11 | #include "PlainTransport.hpp" |
12 | 12 | #include "PipeTransport.hpp" |
13 | 13 | #include "DirectTransport.hpp" |
14 | | -#include "PushTransport.hpp" |
15 | 14 | #include "Producer.hpp" |
16 | 15 | #include "Consumer.hpp" |
17 | 16 | #include "DataProducer.hpp" |
@@ -845,58 +844,6 @@ class Router : public EnhancedEventEmitter, public std::enable_shared_from_thi |
845 | 844 | return transport; |
846 | 845 | } |
847 | 846 |
|
848 | | - std::shared_ptr<PushTransport> createPushTransport( |
849 | | - PushTransportOptions& options |
850 | | - ) |
851 | | - { |
852 | | - MS_lOGD("createPushTransport()"); |
853 | | - json internal = this->_internal; |
854 | | - internal["transportId"] = uuidv4(); |
855 | | - const json reqData; |
856 | | - json appData = options.appData; |
857 | | - |
858 | | - json data = |
859 | | - this->_channel->request("router.createPushTransport", internal, reqData); |
860 | | - TransportParams params; |
861 | | - params.internal = internal; |
862 | | - params.data = data; |
863 | | - params.channel = this->_channel; |
864 | | - params.payloadChannel = this->_payloadChannel; |
865 | | - params.appData = appData; |
866 | | - params.getRouterRtpCapabilities = this->getRouterRtpCapabilitiesFunc; |
867 | | - params.getProducerById = this->getProducerByIdFunc; |
868 | | - params.getDataProducerById = this->getDataProducerByIdFunc; |
869 | | - |
870 | | - std::shared_ptr<PushTransport> transport = std::make_shared<PushTransport>(params); |
871 | | - transport->handleWorkerNotifications(); |
872 | | - |
873 | | - this->_transports[transport->id()] = transport; |
874 | | - //transport.on('@close', () => this->_transports.delete(transport.id)); |
875 | | - transport->on("@close", [self = shared_from_this(), transport]() |
876 | | - { |
877 | | - self->_transports.erase(transport->id()); |
878 | | - |
879 | | - }); |
880 | | - |
881 | | - //transport.on('@newproducer', (producer: Producer) => this->_producers.set(producer.id, producer)); |
882 | | - transport->on("@newproducer", [self = shared_from_this()](std::shared_ptr<Producer>& producer) |
883 | | - { |
884 | | - self->_producers[producer->id()] = producer; |
885 | | - }); |
886 | | - //transport.on('@producerclose', (producer: Producer) => this->_producers.delete(producer.id)); |
887 | | - transport->on("@producerclose", [self = shared_from_this()](std::shared_ptr<Producer>& producer) |
888 | | - { |
889 | | - self->_producers.erase(producer->id()); |
890 | | - }); |
891 | | - |
892 | | - // Emit observer event. |
893 | | - this->_observer->safeEmit("newtransport", transport); |
894 | | - |
895 | | - return transport; |
896 | | - } |
897 | | - |
898 | | - |
899 | | - |
900 | 847 | /** |
901 | 848 | * Pipes the given Producer or DataProducer into another Router in same host. |
902 | 849 | */ |
|
0 commit comments