Unix domain connector.
More...
#include <connector.hpp>
|
using | socket_type = boost::asio::local::stream_protocol::socket |
|
using | handler = std::function< void(std::error_code, std::shared_ptr< stream >)> |
| Connect completion handler. More...
|
|
◆ socket_type
◆ local_connector()
irccd::local_connector::local_connector |
( |
boost::asio::io_context & |
service, |
|
|
boost::filesystem::path |
path |
|
) |
| |
|
inlinenoexcept |
Construct a local connector.
- Parameters
-
service | the service |
path | the path to the file |
◆ connect() [1/2]
void irccd::local_connector::connect |
( |
handler |
handler | ) |
|
|
inlinevirtual |
Start asynchronous connect.
Once the client is connected, the original acceptor must be kept until it is destroyed.
- Precondition
- another connect operation must not be running
-
handler != nullptr
- Parameters
-
Implements irccd::connector.
◆ connect() [2/2]
template<typename Socket , typename Handler >
void irccd::local_connector::connect |
( |
Socket & |
sc, |
|
|
Handler |
handler |
|
) |
| |
|
inlinenoexcept |
Connect to the given socket.
- Parameters
-
sc | the socket type |
handler | the handler |
- Note
- implemented for SocketConnector concept
The documentation for this class was generated from the following file: