Skip to content
This repository was archived by the owner on Apr 23, 2023. It is now read-only.

Commit 4935ca2

Browse files
committed
Increased file tarnsfer message payload size
1 parent 23a5439 commit 4935ca2

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/FileClient.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ FileClient::FileClient(std::string *serverAddress, unsigned short serverPort, Fi
2525
this->uploadClient = NULL;
2626
this->seqNumberMutex = new mutex();
2727
this->sendMessageTimer = new Timer(true, 1000, this, ACK_TIMER_IDENT);
28+
this->sendMessageTimer->wakeupIntervallMS = 250;
2829
this->sendMessageTimer->start();
2930
this->pingTimer = new Timer(true, 1000, this, PING_TIMER_IDENT);
3031
this->transferFinished = false;
@@ -53,19 +54,19 @@ void FileClient::onTimerTick(int identifier)
5354

5455
for (struct SendMessage msg : *msgs)
5556
{
56-
if (msg.sendCount > 3)
57+
/*if (msg.sendCount > 3)
5758
{
5859
restartSendingFS();
5960
}
6061
else
61-
{
62+
{*/
6263
// Resend message:
6364
cout << "Resending message!" << endl;
6465
uploadClient->send(msg.msg);
6566
msg.sendCount++;
6667
msg.sendTime = time(NULL);
6768
sendMessageQueue->push(msg);
68-
}
69+
//}
6970
}
7071
}
7172
break;

src/Filesystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Filesystem {
2222
static Folder* genFolder(std::string path);
2323
static File* genFile(std::string FID);
2424
public:
25-
const unsigned static int partLength = 500;
25+
const unsigned static int partLength = 900;
2626
static long unsigned int filesize(const std::string FID);
2727
static void calcSHA256(const std::string FID, char* buffer);
2828
static bool exists(std::string path);

0 commit comments

Comments
 (0)