BM is just a regular client

unstable
Tom Early 4 years ago
parent 8f17609245
commit 2070e9e537

@ -198,11 +198,6 @@ void CBMProtocol::HandleQueue(void)
// get the packet // get the packet
auto packet = m_Queue.pop(); auto packet = m_Queue.pop();
// check if origin of packet is local
// if not, do not stream it out as it will cause
// network loop between linked XLX peers
if ( packet->IsLocalOrigin() )
{
// encode it // encode it
CBuffer buffer; CBuffer buffer;
if ( EncodeDvPacket(*packet, buffer) ) if ( EncodeDvPacket(*packet, buffer) )
@ -245,7 +240,6 @@ void CBMProtocol::HandleQueue(void)
g_Reflector.ReleaseClients(); g_Reflector.ReleaseClients();
} }
} }
}
m_Queue.Unlock(); m_Queue.Unlock();
} }
@ -351,9 +345,6 @@ void CBMProtocol::OnDvHeaderPacketIn(std::unique_ptr<CDvHeaderPacket> &Header, c
// todo: verify Packet.GetModuleId() is in authorized list of XLX of origin // todo: verify Packet.GetModuleId() is in authorized list of XLX of origin
// todo: do the same for DVFrame and DVLAstFrame packets // todo: do the same for DVFrame and DVLAstFrame packets
// tag packet as remote peer origin
Header->SetRemotePeerOrigin();
// find the stream // find the stream
auto stream = GetStream(Header->GetStreamId()); auto stream = GetStream(Header->GetStreamId());
if ( stream ) if ( stream )
@ -389,15 +380,6 @@ void CBMProtocol::OnDvHeaderPacketIn(std::unique_ptr<CDvHeaderPacket> &Header, c
} }
} }
void CBMProtocol::OnDvFramePacketIn(std::unique_ptr<CDvFramePacket> &DvFrame, const CIp *Ip)
{
// tag packet as remote peer origin
DvFrame->SetRemotePeerOrigin();
// anc call base class
CProtocol::OnDvFramePacketIn(DvFrame, Ip);
}
//////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////
// packet decoding helpers // packet decoding helpers

@ -49,7 +49,6 @@ protected:
// stream helpers // stream helpers
void OnDvHeaderPacketIn(std::unique_ptr<CDvHeaderPacket> &, const CIp &); void OnDvHeaderPacketIn(std::unique_ptr<CDvHeaderPacket> &, const CIp &);
void OnDvFramePacketIn(std::unique_ptr<CDvFramePacket> &, const CIp * = nullptr);
// packet decoding helpers // packet decoding helpers
bool IsValidDvHeaderPacket(const CBuffer &, std::unique_ptr<CDvHeaderPacket> &); bool IsValidDvHeaderPacket(const CBuffer &, std::unique_ptr<CDvHeaderPacket> &);

Loading…
Cancel
Save

Powered by TurnKey Linux.