blob: fe3b2e5e23090c92f8fffb883059651f4e828855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include <irc/irc_client.hpp>
#include <network/poller.hpp>
int main()
{
Poller p;
// Now I'm the bridge, creating an ircclient because needed.
std::shared_ptr<IrcClient> c = std::make_shared<IrcClient>();
p.add_socket_handler(c);
std::shared_ptr<IrcClient> d = std::make_shared<IrcClient>();
p.add_socket_handler(d);
std::shared_ptr<IrcClient> e = std::make_shared<IrcClient>();
p.add_socket_handler(e);
c->connect("localhost", "7877");
d->connect("localhost", "7878");
e->connect("localhost", "7879");
while (true)
p.poll();
return 0;
}
|