-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
some fixed and replay record downloader work
- Loading branch information
Showing
11 changed files
with
60 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "network/filepeer.h" | ||
|
||
FilePeer::FilePeer(MainServer* pOwner, const QString & filePath, qint64 socketId) | ||
: m_pOwner{pOwner}, | ||
m_file{filePath}, | ||
m_connectSocket{socketId} | ||
{ | ||
} | ||
|
||
|
||
void FilePeer::startUpload() | ||
{ | ||
m_file.open(QIODevice::ReadOnly); | ||
|
||
} | ||
|
||
void FilePeer::startDownload() | ||
{ | ||
m_file.remove(); | ||
m_file.open(QIODevice::WriteOnly); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#pragma once | ||
|
||
#include <QObject> | ||
#include <QFile> | ||
class MainServer; | ||
|
||
class FilePeer : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit FilePeer(MainServer* pOwner, const QString & filePath, qint64 socketId); | ||
|
||
void startUpload(); | ||
void startDownload(); | ||
signals: | ||
|
||
public slots: | ||
//void onRequestNextData(); | ||
|
||
private: | ||
MainServer* m_pOwner; | ||
QFile m_file; | ||
QDataStream m_fileStream{&m_file}; | ||
qint64 m_connectSocket; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#include "replayrecordfileserver.h" | ||
#include "network/replayrecordfileserver.h" | ||
|
||
ReplayRecordFileserver::ReplayRecordFileserver(QObject *parent) | ||
: QObject{parent} | ||
ReplayRecordFileserver::ReplayRecordFileserver() | ||
{ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters