Home
last modified time | relevance | path

Searched refs:TcpConnection (Results 1 – 13 of 13) sorted by relevance

/third_party/mindspore/mindspore/ccsrc/ps/core/communicator/
Dtcp_server.h51 class TcpConnection {
53 explicit TcpConnection(struct bufferevent *bev, const evutil_socket_t &fd, TcpServer *server) in TcpConnection() function
55 TcpConnection(const TcpConnection &);
56 virtual ~TcpConnection();
78 …std::function<void(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageMeta> …
83 using OnConnected = std::function<void(const TcpServer &, const TcpConnection &)>;
84 using OnDisconnected = std::function<void(const TcpServer &, const TcpConnection &)>;
85 using OnAccepted = std::function<std::shared_ptr<TcpConnection>(const TcpServer &)>;
102 void AddConnection(const evutil_socket_t &fd, std::shared_ptr<TcpConnection> connection);
104 std::shared_ptr<TcpConnection> GetConnectionByFd(const evutil_socket_t &fd);
[all …]
Dtcp_server.cc35 TcpConnection::~TcpConnection() { bufferevent_free(buffer_event_); } in ~TcpConnection()
36 void TcpConnection::InitConnection(const messageReceive &callback) { tcp_message_handler_.SetCallba… in InitConnection()
38 void TcpConnection::OnReadHandler(const void *buffer, size_t num) { in OnReadHandler()
43 void TcpConnection::SendMessage(const void *buffer, size_t num) const { in SendMessage()
53 const TcpServer *TcpConnection::GetServer() const { return server_; } in GetServer()
55 const evutil_socket_t &TcpConnection::GetFd() const { return fd_; } in GetFd()
57 void TcpConnection::set_callback(const Callback &callback) { callback_ = callback; } in set_callback()
59 bool TcpConnection::SendMessage(const std::shared_ptr<CommMessage> &message) const { in SendMessage()
77 bool TcpConnection::SendMessage(const std::shared_ptr<MessageMeta> &meta, const Protos &protos, con… in SendMessage()
248 void TcpServer::AddConnection(const evutil_socket_t &fd, std::shared_ptr<TcpConnection> connection)… in AddConnection()
[all …]
Dtcp_msg_handler.h31 TcpMsgHandler(AbstractNode *const abstract_node, const std::shared_ptr<core::TcpConnection> &conn,
41 std::shared_ptr<TcpConnection> tcp_conn_;
Dtcp_msg_handler.cc23 …:TcpMsgHandler(AbstractNode *const abstract_node, const std::shared_ptr<core::TcpConnection> &conn, in TcpMsgHandler()
Dcommunicator_base.h69 using TcpMsgCallback = std::function<void(std::shared_ptr<core::TcpConnection> conn,
Dtcp_communicator.cc32 …[&](std::shared_ptr<core::TcpConnection> conn, std::shared_ptr<core::MessageMeta> meta, DataPtr da… in Start()
/third_party/mindspore/mindspore/ccsrc/ps/core/
Dscheduler_node.h63 const std::shared_ptr<TcpConnection> &conn,
79 …cessHeartbeat(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> &conn,
81 …ocessRegister(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> &conn,
83 …void ProcessFinish(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> …
85 …FetchMetadata(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> &conn,
89 …sScaleOutDone(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> &conn,
92 …ssScaleInDone(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> &conn,
96 …cessSendEvent(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> &conn,
Dabstract_node.h60 typedef void (AbstractNode::*ServerHandler)(const std::shared_ptr<TcpConnection> &conn,
67 …std::function<void(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageMeta> …
133 …void Response(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageMeta> &meta…
151 …void ProcessSendMetadata(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<Message…
153 …void ProcessFinish(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageMeta> …
156 …void ProcessScaleOut(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageMeta…
159 …void ProcessScaleIn(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageMeta>…
163 …void ProcessScaleOutDone(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<Message…
166 …void ProcessScaleInDone(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageM…
170 …void ProcessEvent(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<MessageMeta> &…
[all …]
Dabstract_node.cc450 void AbstractNode::Response(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<Messa… in Response()
634 void AbstractNode::ProcessSendMetadata(const std::shared_ptr<TcpConnection> &conn, in ProcessSendMetadata()
686 void AbstractNode::ProcessFinish(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<… in ProcessFinish()
698 void AbstractNode::ProcessScaleOutDone(const std::shared_ptr<TcpConnection> &conn, in ProcessScaleOutDone()
711 void AbstractNode::ProcessScaleInDone(const std::shared_ptr<TcpConnection> &conn, in ProcessScaleInDone()
724 void AbstractNode::ProcessEvent(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<M… in ProcessEvent()
738 void AbstractNode::ProcessScaleOut(const std::shared_ptr<TcpConnection> &conn, const std::shared_pt… in ProcessScaleOut()
758 void AbstractNode::ProcessScaleIn(const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr… in ProcessScaleIn()
932 void AbstractNode::ProcessCollectiveSendData(const std::shared_ptr<TcpConnection> &conn, in ProcessCollectiveSendData()
942 void AbstractNode::ProcessSendData(const std::shared_ptr<TcpConnection> &conn, const std::shared_pt… in ProcessSendData()
[all …]
Dscheduler_node.cc50 const std::shared_ptr<TcpConnection> &conn, in ProcessHeartbeat()
121 …server_->SetMessageCallback([&](const std::shared_ptr<TcpConnection> &conn, const std::shared_ptr<… in CreateTcpServer()
140 const std::shared_ptr<TcpConnection> &conn, in ProcessRegister()
204 …ProcessFinish(const std::shared_ptr<TcpServer> &server, const std::shared_ptr<TcpConnection> &conn, in ProcessFinish()
243 const std::shared_ptr<TcpConnection> &conn, in ProcessFetchMetadata()
261 const std::shared_ptr<TcpConnection> &conn, in ProcessScaleOutDone()
289 const std::shared_ptr<TcpConnection> &conn, in ProcessScaleInDone()
317 const std::shared_ptr<TcpConnection> &conn, in ProcessSendEvent()
/third_party/mindspore/tests/ut/cpp/ps/core/
Dtcp_pb_server_test.cc37 …server_->SetMessageCallback([=](std::shared_ptr<TcpConnection> conn, std::shared_ptr<MessageMeta> … in SetUp()
/third_party/mindspore/mindspore/ccsrc/ps/
Dparameter_server.h97 …void operator()(const std::shared_ptr<core::TcpConnection> &conn, const std::shared_ptr<core::Mess…
Dparameter_server.cc600 void ParameterServer::ServerHandler::operator()(const std::shared_ptr<core::TcpConnection> &conn, in operator ()()