Connection
class Connection : public std::enable_shared_from_this<Connection>
@brief This class serves as the interface for all connections. A connection is only established upon call of the start() function.
Functions
| Name | Description |
|---|---|
| startAsync | Starts the connection Starts the connection asynchronously handler : A callback with the following signature: void myHandler(ErrorCode, ChannelPointer) |
| getConnectionPointer | Stops the connection This function creates a "channel" for the given connection. |
Function Details
getConnectionPointer
std::shared_ptr<Connection> getConnectionPointer()
Stops the connection This function creates a "channel" for the given connection.
Return : Pointer to Channel
startAsync
virtual int startAsync(const ConnectionHandler& handler)
Starts the connection Starts the connection asynchronously
handler
: A callback with the following signature: void myHandler(ErrorCode, ChannelPointer)