#include <mock_net_channel.h>
Public Member Functions | |
| MockNetChannel (const std::string &ip, int port) | |
| MOCK_METHOD (int, SendRequest,(const google::protobuf::Message &, Request::Type, bool),(override)) | |
| MOCK_METHOD (int, SendRawMessage,(const google::protobuf::Message &),(override)) | |
| MOCK_METHOD (int, SendRawMessageData,(const std::string &),(override)) | |
| MOCK_METHOD (int, RecvRawMessageStr,(std::string *),(override)) | |
| MOCK_METHOD (int, RecvRawMessage,(google::protobuf::Message *),(override)) | |
Public Member Functions inherited from resdb::NetChannel | |
| NetChannel (const std::string &ip, int port) | |
| NetChannel (std::unique_ptr< Socket > socket, bool connected=false) | |
| virtual | ~NetChannel ()=default |
| void | Close () |
| void | SetSocket (std::unique_ptr< Socket > socket) |
| void | SetSignatureVerifier (SignatureVerifier *verifier) |
| void | SetDestReplicaInfo (const ReplicaInfo &replica) |
| virtual int | SendRequest (const google::protobuf::Message &message, Request::Type cmd, bool need_response=false) |
| virtual int | SendRawMessage (const google::protobuf::Message &message) |
| virtual int | SendRawMessageData (const std::string &message_str) |
| virtual int | RecvRawMessageStr (std::string *message) |
| virtual int | RecvRawMessage (google::protobuf::Message *message) |
| virtual int | RecvRawMessageData (std::string *message_str) |
| void | SetRecvTimeout (int microseconds) |
| void | IsLongConnection (bool long_connect_tion) |
| void | SetAsyncSend (bool is_async_send) |
Additional Inherited Members | |
Static Public Member Functions inherited from resdb::NetChannel | |
| static std::string | GetRawMessageString (const google::protobuf::Message &message, SignatureVerifier *verifier=nullptr) |
Protected Member Functions inherited from resdb::NetChannel | |
| int | SendDataInternal (const std::string &data) |
| int | SendFromKeepAlive (const std::string &data) |
| int | Send (const std::string &data) |
| int | Recv (std::string *data) |
| int | Connect () |
Protected Attributes inherited from resdb::NetChannel | |
| SignatureVerifier * | verifier_ = nullptr |
| std::unique_ptr< Socket > | socket_ |
| int | max_retry_time_ = 3 |
| std::string | ip_ |
| int | port_ |
| bool | connected_ = false |
| int | read_timeouts_ = 1000000 |
| bool | long_connect_tion_ = false |
| bool | long_connecting_ = false |
| bool | is_async_send_ = false |
Definition at line 28 of file mock_net_channel.h.
|
inline |
Definition at line 30 of file mock_net_channel.h.
| resdb::MockNetChannel::MOCK_METHOD | ( | int | , |
| RecvRawMessage | , | ||
| (google::protobuf::Message *) | , | ||
| (override) | |||
| ) |
| resdb::MockNetChannel::MOCK_METHOD | ( | int | , |
| RecvRawMessageStr | , | ||
| (std::string *) | , | ||
| (override) | |||
| ) |
| resdb::MockNetChannel::MOCK_METHOD | ( | int | , |
| SendRawMessage | , | ||
| (const google::protobuf::Message &) | , | ||
| (override) | |||
| ) |
| resdb::MockNetChannel::MOCK_METHOD | ( | int | , |
| SendRawMessageData | , | ||
| (const std::string &) | , | ||
| (override) | |||
| ) |
| resdb::MockNetChannel::MOCK_METHOD | ( | int | , |
| SendRequest | , | ||
| (const google::protobuf::Message &, Request::Type, bool) | , | ||
| (override) | |||
| ) |