mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 18:10:37 +02:00
add back readDatagram to get to build
This commit is contained in:
parent
da3502eb6c
commit
b0b8dd2e7d
1 changed files with 11 additions and 13 deletions
|
@ -219,20 +219,18 @@ bool LimitedNodeList::packetVersionAndHashMatch(const QByteArray& packet) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// qint64 LimitedNodeList::readDatagram(char* data, qint64 maxSize, QHostAddress* address = 0, quint16 * port = 0) {
|
qint64 LimitedNodeList::readDatagram(QByteArray& incomingPacket, QHostAddress* address = 0, quint16* port = 0) {
|
||||||
|
qint64 result = getNodeSocket().readDatagram(incomingPacket.data(), incomingPacket.size(), address, port);
|
||||||
|
|
||||||
//qint64 LimitedNodeList::readDatagram(QByteArray& incomingPacket, QHostAddress* address = 0, quint16* port = 0) {
|
SharedNodePointer sendingNode = sendingNodeForPacket(incomingPacket);
|
||||||
// qint64 result = getNodeSocket().readDatagram(incomingPacket.data(), incomingPacket.size(), address, port);
|
if (sendingNode) {
|
||||||
//
|
emit dataReceived(sendingNode->getType(), incomingPacket.size());
|
||||||
// SharedNodePointer sendingNode = sendingNodeForPacket(incomingPacket);
|
} else {
|
||||||
// if (sendingNode) {
|
emit dataReceived(NodeType::Unassigned, incomingPacket.size());
|
||||||
// emit dataReceived(sendingNode->getType(), incomingPacket.size());
|
}
|
||||||
// } else {
|
|
||||||
// emit dataReceived(NodeType::Unassigned, incomingPacket.size());
|
return result;
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// return result;
|
|
||||||
//}
|
|
||||||
|
|
||||||
qint64 LimitedNodeList::writeDatagram(const QByteArray& datagram, const HifiSockAddr& destinationSockAddr) {
|
qint64 LimitedNodeList::writeDatagram(const QByteArray& datagram, const HifiSockAddr& destinationSockAddr) {
|
||||||
// XXX can BandwidthRecorder be used for this?
|
// XXX can BandwidthRecorder be used for this?
|
||||||
|
|
Loading…
Reference in a new issue