mirror of
https://github.com/overte-org/overte.git
synced 2025-04-15 11:29:00 +02:00
Fix HifiSockAddr references
This commit is contained in:
parent
74c2788a14
commit
320b5a2d22
4 changed files with 7 additions and 7 deletions
|
@ -894,7 +894,7 @@ void NodeList::parseNodeFromPacketStream(QDataStream& packetStream) {
|
|||
info.publicSocket.setAddress(_domainHandler.getIP());
|
||||
}
|
||||
|
||||
// WEBRTC TODO: Handle WebRTC-connected nodes. Probably need to include SocketType in HifiSockAddr << and >>
|
||||
// WEBRTC TODO: Handle WebRTC-connected nodes. Probably need to include SocketType in SockAddr << and >>
|
||||
info.publicSocket.setSocketType(SocketType::UDP);
|
||||
info.localSocket.setSocketType(SocketType::UDP);
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ qintptr NetworkSocket::socketDescriptor(SocketType socketType) const {
|
|||
}
|
||||
|
||||
|
||||
qint64 NetworkSocket::writeDatagram(const QByteArray& datagram, const HifiSockAddr& sockAddr) {
|
||||
qint64 NetworkSocket::writeDatagram(const QByteArray& datagram, const SockAddr& sockAddr) {
|
||||
switch (sockAddr.getSocketType()) {
|
||||
case SocketType::UDP:
|
||||
// WEBRTC TODO: The Qt documentation says that the following call shouldn't be used if the UDP socket is connected!!!
|
||||
|
@ -189,7 +189,7 @@ qint64 NetworkSocket::pendingDatagramSize() {
|
|||
#endif
|
||||
}
|
||||
|
||||
qint64 NetworkSocket::readDatagram(char* data, qint64 maxSize, HifiSockAddr* sockAddr) {
|
||||
qint64 NetworkSocket::readDatagram(char* data, qint64 maxSize, SockAddr* sockAddr) {
|
||||
#if defined(WEBRTC_DATA_CHANNELS)
|
||||
// Read per preceding pendingDatagramSize() if any, otherwise alternate socket types.
|
||||
if (_pendingDatagramSizeSocketType == SocketType::UDP
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#include <shared/WebRTC.h>
|
||||
|
||||
#include "../HifiSockAddr.h"
|
||||
#include "../SockAddr.h"
|
||||
#include "../NodeType.h"
|
||||
#include "../SocketType.h"
|
||||
#if defined(WEBRTC_DATA_CHANNELS)
|
||||
|
@ -76,7 +76,7 @@ public:
|
|||
/// @param datagram The datagram to send.
|
||||
/// @param sockAddr The address to send to.
|
||||
/// @return The number of bytes if successfully sent, otherwise <code>-1</code>.
|
||||
qint64 writeDatagram(const QByteArray& datagram, const HifiSockAddr& sockAddr);
|
||||
qint64 writeDatagram(const QByteArray& datagram, const SockAddr& sockAddr);
|
||||
|
||||
/// @brief Gets the number of bytes waiting to be written.
|
||||
/// @details For UDP, there's a single buffer used for all destinations. For WebRTC, each destination has its own buffer.
|
||||
|
@ -100,7 +100,7 @@ public:
|
|||
/// @param maxSize The maximum number of bytes to read.
|
||||
/// @param sockAddr The destination to write the source network address into.
|
||||
/// @return The number of bytes if successfully read, otherwise <code>-1</code>.
|
||||
qint64 readDatagram(char* data, qint64 maxSize, HifiSockAddr* sockAddr = nullptr);
|
||||
qint64 readDatagram(char* data, qint64 maxSize, SockAddr* sockAddr = nullptr);
|
||||
|
||||
|
||||
/// @brief Gets the state of the UDP or WebRTC socket.
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#include <QtCore/QTimer>
|
||||
#include <QWebSocketServer>
|
||||
|
||||
#include "../HifiSockAddr.h"
|
||||
#include "../SockAddr.h"
|
||||
|
||||
/// @addtogroup Networking
|
||||
/// @{
|
||||
|
|
Loading…
Reference in a new issue