aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/actors/interconnect/poller_tcp_unit_epoll.h
blob: 70aee1c66bdec203d6eefbe8b3e9eec3881e3cb3 (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
26
27
28
29
30
31
32
33
#pragma once

#include "poller_tcp_unit.h"

namespace NInterconnect {
    class TPollerUnitEpoll: public TPollerUnit { 
    public: 
        TPollerUnitEpoll(); 
        virtual ~TPollerUnitEpoll(); 

    private: 
        virtual void StartReadOperation( 
            const TIntrusivePtr<TSharedDescriptor>& s, 
            TFDDelegate&& operation) override; 

        virtual void StartWriteOperation( 
            const TIntrusivePtr<TSharedDescriptor>& s, 
            TFDDelegate&& operation) override; 

        virtual void ProcessRead() override; 
        virtual void ProcessWrite() override; 

        template <bool Write> 
        void Process(); 

        template <bool Write> 
        int GetDescriptor() const; 

        const int ReadDescriptor, WriteDescriptor; 
        ::sigset_t sigmask; 
    }; 

}