|
Robot Raconteur Core C++ Library
|
Server endpoint representing a client connection. More...
#include <Service.h>
Static Public Member Functions | |
| static boost::shared_ptr< ServerEndpoint > | GetCurrentEndpoint () |
| Returns the current server endpoint. | |
| static boost::shared_ptr< AuthenticatedUser > | GetCurrentAuthenticatedUser () |
| Returns the current authenticated user. | |
Server endpoint representing a client connection.
Robot Raconteur creates endpoint pairs between a client and service. For clients, this endpoint is a ClientContext. For services, the endpoint becomes a ServerEndpoint. ServerEndpoints are used to address a specific client connected to a service, since services may have multiple clients connected concurrently. ServerEndpoints also provide client authentication information.
Use ServerEndpoint::GetCurrentEndpoint()->GetLocalEndpoint() to retrieve the uint32_t current endpoint ID. Use ServerEndpoint::GetCurrentAuthenticatedUser() to retrieve the current user authentication information.
|
static |
Returns the current authenticated user.
Users that have been authenticated have a corresponding AuthenticatedUser object associated with the ServerEndpoint. GetCurrentAuthenticatedUser() returns the AuthenticatedUser associated with the current ServerEndpoint during a request or packet event. This is a thread-specific value and only valid during the initial request or packet event invocation.
Throws PermissionDeniedException or AuthenticationException if there is no AuthenticatedUser set in the current thread.
|
static |
Returns the current server endpoint.
Returns the current server endpoint during a request or packet event. This is a thread-specific value and only valid during the initial request or packet event invocation.
Throws InvalidOperationException if not during a request or packet event