tgbot-cpp
Loading...
Searching...
No Matches
TgWebhookLocalServer.h
Go to the documentation of this file.
1#ifndef TGBOT_TGWEBHOOKLOCALSERVER_H
2#define TGBOT_TGWEBHOOKLOCALSERVER_H
3
4#ifdef BOOST_ASIO_HAS_LOCAL_SOCKETS
5
7
8#include <string>
9
10namespace TgBot {
11
17class TgWebhookLocalServer : public TgWebhookServer<boost::asio::local::stream_protocol> {
18
19public:
20 TgWebhookLocalServer(const std::string& unixSocketPath, const std::string& path, const EventHandler& eventHandler)
21 : TgWebhookServer<boost::asio::local::stream_protocol>(boost::asio::local::stream_protocol::endpoint(unixSocketPath),
22 path, eventHandler)
23 {
24 }
25
26 TgWebhookLocalServer(const std::string& unixSocketPath, const Bot& bot)
27 : TgWebhookServer<boost::asio::local::stream_protocol>(boost::asio::local::stream_protocol::endpoint(unixSocketPath),
28 bot)
29 {
30 }
31};
32
33}
34
35#endif //BOOST_ASIO_HAS_LOCAL_SOCKETS
36
37#endif //TGBOT_TGWEBHOOKLOCALSERVER_H
This object holds other objects specific for this bot instance.
Definition Bot.h:21
This class setups HTTP server for receiving Telegram Update objects from unix socket.
TgWebhookLocalServer(const std::string &unixSocketPath, const Bot &bot)
TgWebhookLocalServer(const std::string &unixSocketPath, const std::string &path, const EventHandler &eventHandler)
Definition Api.h:40