aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect/poller_tcp.h
blob: 310265eccd58f150f87a85654a70650552bf2524 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include "poller_tcp_unit.h"
#include "poller.h"

#include <util/generic/vector.h>
#include <util/generic/hash.h>

namespace NInterconnect {
    class TPollerThreads: public NActors::IPoller {
    public:
        TPollerThreads(size_t units = 1U, bool useSelect = false);
        ~TPollerThreads();

        void Start();
        void Stop();

        void StartRead(const TIntrusivePtr<TSharedDescriptor>& s, TFDDelegate&& operation) override;
        void StartWrite(const TIntrusivePtr<TSharedDescriptor>& s, TFDDelegate&& operation) override;

    private:
        TVector<TPollerUnit::TPtr> Units;
    };

}