|
CIRCT 22.0.0git
|


Public Member Functions | |
| Impl (Context &ctxt, int port) | |
| Start a server on the given port. -1 means to let the OS pick a port. | |
| ~Impl () | |
| Context & | getContext () |
| void | setManifest (int esiVersion, const std::vector< uint8_t > &compressedManifest) |
| ReadChannelPort & | registerReadPort (const std::string &name, const std::string &type) |
| WriteChannelPort & | registerWritePort (const std::string &name, const std::string &type) |
| void | stop (uint32_t timeoutMS=0) |
| int | getPort () |
| ServerUnaryReactor * | GetManifest (CallbackServerContext *context, const VoidMessage *, Manifest *response) override |
| ServerUnaryReactor * | ListChannels (CallbackServerContext *, const VoidMessage *, ListOfChannels *channelsOut) override |
| Load the list of channels into the response and fire it off. | |
| ServerWriteReactor< esi::cosim::Message > * | ConnectToClientChannel (CallbackServerContext *context, const ChannelDesc *request) override |
| When a client sends a message to a read port (write port on this end), start streaming messages until the client calls uncle and requests a cancellation. | |
| ServerUnaryReactor * | SendToServer (CallbackServerContext *context, const esi::cosim::AddressedMessage *request, esi::cosim::VoidMessage *response) override |
| When a client sends a message to a write port (a read port on this end), simply locate the associated port, and write that message into its queue. | |
Private Attributes | |
| Context & | ctxt |
| int | esiVersion |
| std::vector< uint8_t > | compressedManifest |
| std::map< std::string, std::unique_ptr< RpcServerReadPort > > | readPorts |
| std::map< std::string, std::unique_ptr< RpcServerWritePort > > | writePorts |
| int | port = -1 |
| std::unique_ptr< Server > | server |
Definition at line 51 of file RpcServer.cpp.
| Impl::Impl | ( | Context & | ctxt, |
| int | port | ||
| ) |
Start a server on the given port. -1 means to let the OS pick a port.
Definition at line 150 of file RpcServer.cpp.
References ctxt, esi::Context::getLogger(), esi::Logger::info(), port, server, and writePort().
| Impl::~Impl | ( | ) |
Definition at line 186 of file RpcServer.cpp.
|
override |
When a client sends a message to a read port (write port on this end), start streaming messages until the client calls uncle and requests a cancellation.
Definition at line 350 of file RpcServer.cpp.
References esi::Logger::debug(), getContext(), esi::Context::getLogger(), and writePorts.
|
inline |
Definition at line 57 of file RpcServer.cpp.
References ctxt.
Referenced by ConnectToClientChannel().
|
override |
Definition at line 204 of file RpcServer.cpp.
References compressedManifest, context, and esiVersion.
|
inline |
Definition at line 76 of file RpcServer.cpp.
References port.
|
override |
Load the list of channels into the response and fire it off.
Definition at line 215 of file RpcServer.cpp.
References context, port, readPorts, and writePorts.
| ReadChannelPort & Impl::registerReadPort | ( | const std::string & | name, |
| const std::string & | type | ||
| ) |
Definition at line 191 of file RpcServer.cpp.
| WriteChannelPort & Impl::registerWritePort | ( | const std::string & | name, |
| const std::string & | type | ||
| ) |
Definition at line 197 of file RpcServer.cpp.
References port, and writePorts.
|
override |
When a client sends a message to a write port (a read port on this end), simply locate the associated port, and write that message into its queue.
Definition at line 365 of file RpcServer.cpp.
References context, ctxt, esi::Logger::debug(), esi::Logger::error(), esi::Context::getLogger(), and readPorts.
|
inline |
Definition at line 63 of file RpcServer.cpp.
References compressedManifest, and esiVersion.
| void Impl::stop | ( | uint32_t | timeoutMS = 0 | ) |
Definition at line 167 of file RpcServer.cpp.
References port, readPorts, server, and writePorts.
Referenced by ~Impl().
|
private |
Definition at line 97 of file RpcServer.cpp.
Referenced by GetManifest(), and setManifest().
|
private |
Definition at line 95 of file RpcServer.cpp.
Referenced by getContext(), Impl(), esiaccel.accelerator.AcceleratorConnection::manifest(), and SendToServer().
|
private |
Definition at line 96 of file RpcServer.cpp.
Referenced by GetManifest(), and setManifest().
|
private |
Definition at line 100 of file RpcServer.cpp.
Referenced by getPort(), Impl(), ListChannels(), registerReadPort(), registerWritePort(), and stop().
|
private |
Definition at line 98 of file RpcServer.cpp.
Referenced by ListChannels(), registerReadPort(), SendToServer(), and stop().
|
private |
Definition at line 101 of file RpcServer.cpp.
|
private |
Definition at line 99 of file RpcServer.cpp.
Referenced by ConnectToClientChannel(), ListChannels(), registerWritePort(), and stop().