Connection class draft

This commit is contained in:
Atlante45 2015-07-27 12:06:27 -07:00
parent 6db401f6d3
commit f520caa5fe
4 changed files with 75 additions and 5 deletions

View 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) {
}

View 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

View file

@ -14,7 +14,6 @@
#include <algorithm>
#include <QtCore/QThread>
#include <QtCore/QTimer>
#include <SharedUtil.h>

View file

@ -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;