A session is what allows you to connect services together locally or over the network. They can be used as server or client and can register or obtain services (on all sides, even in multi-client). You can read the guides to register a service and get a service.
Global Classes
class qi::Session
Functions (class qi::Session)
qi::Session::setAuthProviderFactory
qi::Session::setClientAuthenticatorFactory
Signals (class qi::Session)
#include <qi/session.hpp>
noncopyable
, boost::enable_shared_from_this< Session >
ServiceLocality
¶Name | Value | Brief |
---|---|---|
ServiceLocality_All |
0 | |
ServiceLocality_Local |
1 | |
ServiceLocality_Remote |
2 |
serviceRegistered
serviceUnregistered
connected
disconnected
Session
(bool enforceAuthentication)~Session
()connect
(const char* serviceDirectoryURL)connect
(const std::string& serviceDirectoryURL)connect
(const qi::Url& serviceDirectoryURL)isConnected
() consturl
() constservices
(ServiceLocality locality)service
(const std::string& aservice)service
(const std::string& service, const std::string& protocol)listen
(const qi::Url& address)endpoints
() constsetIdentity
(const std::string& key, const std::string& crt)close
()listenStandalone
(const qi::Url& address)listenStandalone
(const std::vector<qi::Url>& addresses)registerService
(const std::string& name, AnyObject object)unregisterService
(unsigned int serviceId)setAuthProviderFactory
(AuthProviderFactoryPtr)setClientAuthenticatorFactory
(ClientAuthenticatorFactoryPtr)loadService
(const std::string& moduleName, const std::string& renameModule, const AnyReferenceVector& args)callModule
(const std::string& moduleName, const AnyReferenceVector& args)waitForService
(const std::string& service)A Session allows you to interconnect services on the same machine or over the network.
qi::Session::
serviceRegistered
¶qi::Session::
serviceUnregistered
¶qi::Session::
connected
¶qi::Session::
disconnected
¶qi::Session::
Session
(bool enforceAuthentication = false)¶qi::Session::
~Session
()¶qi::Session::
connect
(const char* serviceDirectoryURL)¶qi::Session::
connect
(const std::string& serviceDirectoryURL)¶qi::Session::
connect
(const qi::Url& serviceDirectoryURL)¶qi::Session::
isConnected
() const
¶qi::Session::
services
(ServiceLocality locality = ServiceLocality_All)¶qi::Session::
service
(const std::string& aservice)¶qi::Session::
service
(const std::string& service, const std::string& protocol)¶qi::Session::
listen
(const qi::Url& address)¶qi::Session::
endpoints
() const
¶qi::Session::
setIdentity
(const std::string& key, const std::string& crt)¶qi::Session::
close
()¶qi::Session::
listenStandalone
(const qi::Url& address)¶qi::Session::
listenStandalone
(const std::vector<qi::Url>& addresses)¶qi::Session::
registerService
(const std::string& name, AnyObject object)¶qi::Session::
unregisterService
(unsigned int serviceId)¶qi::Session::
setAuthProviderFactory
(AuthProviderFactoryPtr)¶qi::Session::
setClientAuthenticatorFactory
(ClientAuthenticatorFactoryPtr)¶qi::Session::
loadService
(const std::string& moduleName, const std::string& renameModule = "", const AnyReferenceVector& args = AnyReferenceVector()¶Load a module and register the specified object on the session
Tries to call the factory with (this, args...) if possible, otherwise it calls it with (args...) only.
qi::Session::
callModule
(const std::string& moduleName, const AnyReferenceVector& args = AnyReferenceVector()¶Load a module and call the specified function asynchronously
Tries to call the function with (this, args...) if possible, otherwise it calls it with (args...) only.
qi::Session::
waitForService
(const std::string& service)¶Waits for a service to become available. The future is set immediately if the service is already available.