|
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 () |
| 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 50 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 149 of file RpcServer.cpp.
References ctxt, esi::Context::getLogger(), esi::Logger::info(), port, server, and writePort().
| Impl::~Impl | ( | ) |
Definition at line 179 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 326 of file RpcServer.cpp.
References esi::Logger::debug(), getContext(), esi::Context::getLogger(), and writePorts.
|
inline |
Definition at line 56 of file RpcServer.cpp.
References ctxt.
Referenced by ConnectToClientChannel().
|
override |
Definition at line 197 of file RpcServer.cpp.
References compressedManifest, context, and esiVersion.
|
inline |
Definition at line 75 of file RpcServer.cpp.
References port.
|
override |
Load the list of channels into the response and fire it off.
Definition at line 208 of file RpcServer.cpp.
References context, port, readPorts, and writePorts.
| ReadChannelPort & Impl::registerReadPort | ( | const std::string & | name, |
| const std::string & | type | ||
| ) |
Definition at line 184 of file RpcServer.cpp.
| WriteChannelPort & Impl::registerWritePort | ( | const std::string & | name, |
| const std::string & | type | ||
| ) |
Definition at line 190 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 341 of file RpcServer.cpp.
|
inline |
Definition at line 62 of file RpcServer.cpp.
References compressedManifest, and esiVersion.
| void Impl::stop | ( | ) |
Definition at line 166 of file RpcServer.cpp.
References port, readPorts, server, and writePorts.
Referenced by ~Impl().
|
private |
Definition at line 96 of file RpcServer.cpp.
Referenced by GetManifest(), and setManifest().
|
private |
Definition at line 94 of file RpcServer.cpp.
Referenced by getContext(), Impl(), and esiaccel.accelerator.AcceleratorConnection::manifest().
|
private |
Definition at line 95 of file RpcServer.cpp.
Referenced by GetManifest(), and setManifest().
|
private |
Definition at line 99 of file RpcServer.cpp.
Referenced by getPort(), Impl(), ListChannels(), registerReadPort(), registerWritePort(), and stop().
|
private |
Definition at line 97 of file RpcServer.cpp.
Referenced by ListChannels(), registerReadPort(), SendToServer(), and stop().
|
private |
Definition at line 100 of file RpcServer.cpp.
|
private |
Definition at line 98 of file RpcServer.cpp.
Referenced by ConnectToClientChannel(), ListChannels(), registerWritePort(), and stop().