mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-05 04:24:27 +02:00
Connection class draft
This commit is contained in:
parent
6db401f6d3
commit
f520caa5fe
4 changed files with 75 additions and 5 deletions
31
libraries/networking/src/udt/Connection.cpp
Normal file
31
libraries/networking/src/udt/Connection.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// Connection.cpp
|
||||
//
|
||||
//
|
||||
// Created by Clement on 7/27/15.
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#include "Connection.h"
|
||||
|
||||
#include "../HifiSockAddr.h"
|
||||
#include "ControlPacket.h"
|
||||
#include "Packet.h"
|
||||
#include "Socket.h"
|
||||
|
||||
using namespace udt;
|
||||
|
||||
Connection::Connection(Socket* parentSocket, HifiSockAddr destination) {
|
||||
|
||||
}
|
||||
|
||||
void Connection::send(std::unique_ptr<Packet> packet) {
|
||||
|
||||
}
|
||||
|
||||
void Connection::processControl(std::unique_ptr<ControlPacket> controlPacket) {
|
||||
|
||||
}
|
41
libraries/networking/src/udt/Connection.h
Normal file
41
libraries/networking/src/udt/Connection.h
Normal file
|
@ -0,0 +1,41 @@
|
|||
//
|
||||
// Connection.h
|
||||
//
|
||||
//
|
||||
// Created by Clement on 7/27/15.
|
||||
// Copyright 2015 High Fidelity, Inc.
|
||||
//
|
||||
// Distributed under the Apache License, Version 2.0.
|
||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
|
||||
#ifndef hifi_Connection_h
|
||||
#define hifi_Connection_h
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "SendQueue.h"
|
||||
|
||||
class HifiSockAddr;
|
||||
|
||||
namespace udt {
|
||||
|
||||
class ControlPacket;
|
||||
class Packet;
|
||||
class Socket;
|
||||
|
||||
class Connection {
|
||||
|
||||
public:
|
||||
Connection(Socket* parentSocket, HifiSockAddr destination);
|
||||
|
||||
void send(std::unique_ptr<Packet> packet);
|
||||
void processControl(std::unique_ptr<ControlPacket> controlPacket);
|
||||
|
||||
private:
|
||||
std::unique_ptr<SendQueue> _sendQueue;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // hifi_Connection_h
|
|
@ -14,7 +14,6 @@
|
|||
#include <algorithm>
|
||||
|
||||
#include <QtCore/QThread>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
#include <SharedUtil.h>
|
||||
|
||||
|
|
|
@ -15,15 +15,14 @@
|
|||
#include <list>
|
||||
#include <unordered_map>
|
||||
|
||||
#include <QObject>
|
||||
#include <QReadWriteLock>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QReadWriteLock>
|
||||
#include <QtCore/QTimer>
|
||||
|
||||
#include "../HifiSockAddr.h"
|
||||
|
||||
#include "SeqNum.h"
|
||||
|
||||
class QTimer;
|
||||
|
||||
namespace udt {
|
||||
|
||||
class Socket;
|
||||
|
|
Loading…
Reference in a new issue