NCBI C++ ToolKit
|
#include "nc_pch.hpp"
#include <corelib/ncbireg.hpp>
#include <corelib/ncbifile.hpp>
#include <corelib/request_ctx.hpp>
#include <corelib/ncbi_bswap.hpp>
#include <util/md5.hpp>
#include "netcached.hpp"
#include "message_handler.hpp"
#include "netcache_version.hpp"
#include "nc_stat.hpp"
#include "peer_control.hpp"
#include "distribution_conf.hpp"
#include "periodic_sync.hpp"
#include "active_handler.hpp"
#include "nc_storage.hpp"
#include "nc_storage_blob.hpp"
#include "logging.hpp"
Go to the source code of this file.
Go to the SVN repository for this file.
Macros | |
#define | LOG_CURRENT_FUNCTION |
#define | USE_ALWAYS_COPY_UPD 0 |
Variables | |
static CNCMessageHandler::SCommandDef | s_CommandMap [] |
Definition of all NetCache commands. More... | |
static SNSProtoArgument | s_AuthArgs [] |
#define LOG_CURRENT_FUNCTION |
Definition at line 57 of file message_handler.cpp.
#define USE_ALWAYS_COPY_UPD 0 |
Definition at line 65 of file message_handler.cpp.
|
static |
Definition at line 1684 of file message_handler.cpp.
Referenced by CNCMessageHandler::x_ReadAuthMessage().
|
static |
Definition of all NetCache commands.
General format of a "NetCache" command is as follows:
CMD param1 param2 ...
Format of "ICache" command is as follows:
IC(cache) CMD param1 param2 ...
Here "IC" is two letters that appear in command literally. "cache" is name of the cache where blob is stored; it's mentioned in parameter list as first parameter with type eNSPA_ICPrefix. Every command parameter can be given as just value or as name=value pair. String parameter values can be enclosed in double quotes. If parameter is declared with the flag eNSPA_Optional then it can be skipped from the command, in this case its default value will be used (if any). If parameter flag eNSPA_Optchain has the same meaning except if it's not provided then all following parameters marked as eNSPA_Optional will be assumed not provided too.
If command needs some binary data along with it then it's sent split in chunks each having 4-byte integer prefix containing the length of the chunk. When all data is sent special chunk length 0xFFFFFFFF should be sent at the end. Successful response of each command is sent as one line starting with "OK:" and then space-separated parameters that need to be returned. If response should contain binary data then initial response line should have "SIZE=nnn" with the size of binary data to follow. Unsuccessful responses to commands always start with "ERR:" and then error explanation follows.
Descriptions of commands have
Definition at line 113 of file message_handler.cpp.