NCBI C++ ToolKit
Classes | Macros | Functions
netstorage_rpc.cpp File Reference
#include <ncbi_pch.hpp>
#include "netservice_api_impl.hpp"
#include "netstorage_direct_nc.hpp"
#include <connect/services/error_codes.hpp>
#include <util/ncbi_url.hpp>
#include <corelib/request_ctx.hpp>
#include <sstream>
#include <array>
+ Include dependency graph for netstorage_rpc.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  CSendJsonOverSocket
 
struct  SIssue
 
struct  SIssue::SBuilder
 
class  CNetStorageServerListener
 
class  CJsonOverUTTPExecHandler
 
struct  SNetStorageObjectRPC
 
struct  SNetStorageObjectRPC::SContext
 
struct  SNetStorageObjectRPC::SIState
 
struct  SNetStorageObjectRPC::SOState
 
struct  SConnReset
 
struct  SNetStorageByKeyRPC
 
struct  SNetStorageAdminImpl
 

Macros

#define NCBI_USE_ERRCODE_X   NetStorage_RPC
 
#define NST_PROTOCOL_VERSION   "1.0.0"
 
#define WRITE_BUFFER_SIZE   (64 * 1024)
 
#define READ_BUFFER_SIZE   (64 * 1024)
 
#define END_OF_DATA_MARKER   '\n'
 

Functions

static void s_WriteToSocket (CSocket &sock, const char *output_buffer, size_t output_buffer_size)
 
void s_SendUTTP (CSocket &sock, function< void(CUTTPWriter &)> f)
 
template<class TContiguousContainer >
void s_ReadSocket (CSocket &sock, TContiguousContainer &buffer, CUTTPReader &uttp_reader)
 
const CNcbiDiagoperator<< (const CNcbiDiag &diag, const SIssue &issue)
 
ostream & operator<< (ostream &os, const SIssue &issue)
 
void s_ThrowError (Int8 code, Int8 sub_code, const string &err_msg)
 
void s_TrapErrors (const CJsonNode &request, const CJsonNode &reply, CNetServerConnection &conn, SNetStorage::SConfig::EErrMode err_mode, INetServerConnectionListener &listener)
 
CJsonNode s_ReadMessage (const CJsonNode &request, CNetServerConnection &conn, SNetStorage::SConfig::EErrMode err_mode, INetServerConnectionListener &listener)
 
void s_SetStorageFlags (CJsonNode &node, TNetStorageFlags flags)
 

Macro Definition Documentation

◆ END_OF_DATA_MARKER

#define END_OF_DATA_MARKER   '\n'

Definition at line 54 of file netstorage_rpc.cpp.

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   NetStorage_RPC

Definition at line 47 of file netstorage_rpc.cpp.

◆ NST_PROTOCOL_VERSION

#define NST_PROTOCOL_VERSION   "1.0.0"

Definition at line 49 of file netstorage_rpc.cpp.

◆ READ_BUFFER_SIZE

#define READ_BUFFER_SIZE   (64 * 1024)

Definition at line 52 of file netstorage_rpc.cpp.

◆ WRITE_BUFFER_SIZE

#define WRITE_BUFFER_SIZE   (64 * 1024)

Definition at line 51 of file netstorage_rpc.cpp.

Function Documentation

◆ operator<<() [1/2]

const CNcbiDiag& operator<< ( const CNcbiDiag diag,
const SIssue issue 
)

Definition at line 274 of file netstorage_rpc.cpp.

References SIssue::Print().

◆ operator<<() [2/2]

ostream& operator<< ( ostream &  os,
const SIssue issue 
)

Definition at line 279 of file netstorage_rpc.cpp.

References SIssue::Print().

◆ s_ReadMessage()

CJsonNode s_ReadMessage ( const CJsonNode request,
CNetServerConnection conn,
SNetStorage::SConfig::EErrMode  err_mode,
INetServerConnectionListener listener 
)

◆ s_ReadSocket()

template<class TContiguousContainer >
void s_ReadSocket ( CSocket sock,
TContiguousContainer &  buffer,
CUTTPReader uttp_reader 
)

◆ s_SendUTTP()

void s_SendUTTP ( CSocket sock,
function< void(CUTTPWriter &)>  f 
)

◆ s_SetStorageFlags()

void s_SetStorageFlags ( CJsonNode node,
TNetStorageFlags  flags 
)

◆ s_ThrowError()

void s_ThrowError ( Int8  code,
Int8  sub_code,
const string err_msg 
)

◆ s_TrapErrors()

void s_TrapErrors ( const CJsonNode request,
const CJsonNode reply,
CNetServerConnection conn,
SNetStorage::SConfig::EErrMode  err_mode,
INetServerConnectionListener listener 
)

◆ s_WriteToSocket()

static void s_WriteToSocket ( CSocket sock,
const char *  output_buffer,
size_t  output_buffer_size 
)
static
Modified on Fri Apr 12 17:20:15 2024 by modify_doxy.py rev. 669887