Changeset View
Changeset View
Standalone View
Standalone View
source/network/NetFileTransfer.h
/* Copyright (C) 2016 Wildfire Games. | /* Copyright (C) 2018 Wildfire Games. | ||||
* This file is part of 0 A.D. | * This file is part of 0 A.D. | ||||
* | * | ||||
* 0 A.D. is free software: you can redistribute it and/or modify | * 0 A.D. is free software: you can redistribute it and/or modify | ||||
* it under the terms of the GNU General Public License as published by | * it under the terms of the GNU General Public License as published by | ||||
* the Free Software Foundation, either version 2 of the License, or | * the Free Software Foundation, either version 2 of the License, or | ||||
* (at your option) any later version. | * (at your option) any later version. | ||||
* | * | ||||
* 0 A.D. is distributed in the hope that it will be useful, | * 0 A.D. is distributed in the hope that it will be useful, | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Should be called when a message is received from the network. | * Should be called when a message is received from the network. | ||||
* Returns INFO::SKIPPED if the message is not one that this class handles. | * Returns INFO::SKIPPED if the message is not one that this class handles. | ||||
* Returns INFO::OK if the message is handled successfully, | * Returns INFO::OK if the message is handled successfully, | ||||
* or ERR::FAIL if handled unsuccessfully. | * or ERR::FAIL if handled unsuccessfully. | ||||
*/ | */ | ||||
Status HandleMessageReceive(const CNetMessage* message); | Status HandleMessageReceive(const CNetMessage* message); | ||||
Status OnFileTransferResponse(const CNetMessage* message); | |||||
Status OnFileTransferData(const CNetMessage* message); | |||||
Status OnFileTransferAck(const CNetMessage* message); | |||||
elexis: private | |||||
/** | /** | ||||
* Registers a file-receiving task. | * Registers a file-receiving task. | ||||
*/ | */ | ||||
void StartTask(const shared_ptr<CNetFileReceiveTask>& task); | void StartTask(const shared_ptr<CNetFileReceiveTask>& task); | ||||
/** | /** | ||||
* Registers data to be sent in response to a request. | * Registers data to be sent in response to a request. | ||||
* (Callers are expected to have their own mechanism for receiving | * (Callers are expected to have their own mechanism for receiving | ||||
Show All 37 Lines |
Wildfire Games · Phabricator
private