NCBI C++ ToolKit
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
CPSGS_SocketIOCallback Class Reference

Search Toolkit Book for CPSGS_SocketIOCallback

#include "psgs_io_callbacks.hpp"
(Private to src/app/pubseq_gateway/server.)

+ Collaboration diagram for CPSGS_SocketIOCallback:

Public Types

enum  EPSGS_Event { ePSGS_Readable , ePSGS_Writable , ePSGS_Disconnect , ePSGS_Prioritized }
 
enum  EPSGS_PollContinue { ePSGS_StopPolling , ePSGS_ContinuePolling }
 
using TEventCB = function< EPSGS_PollContinue(void *user_data)>
 
using TTimeoutCB = function< EPSGS_PollContinue(void *user_data)>
 
using TErrorCB = function< EPSGS_PollContinue(const string &message, void *user_data)>
 

Public Member Functions

 CPSGS_SocketIOCallback (uv_loop_t *loop, size_t request_id, int fd, EPSGS_Event event, uint64_t timeout_millisec, void *user_data, TEventCB event_cb, TTimeoutCB timeout_cb, TErrorCB error_cb)
 
 ~CPSGS_SocketIOCallback ()
 
 CPSGS_SocketIOCallback (const CPSGS_SocketIOCallback &)=delete
 
 CPSGS_SocketIOCallback (CPSGS_SocketIOCallback &&)=delete
 
CPSGS_SocketIOCallbackoperator= (const CPSGS_SocketIOCallback &)=delete
 
void StartPolling (void)
 
void StopPolling (void)
 
bool IsSafeToDelete (void)
 
void x_UvOnTimer (void)
 
void x_UvOnSocketEvent (int status)
 
void x_UvTimerHandleClosedEvent (void)
 
void x_UvSocketPollHandleClosedEvent (void)
 

Private Member Functions

void x_StartPolling (void)
 
void x_StopPolling (void)
 
void x_StartTimer (void)
 
void x_StopTimer (void)
 
void x_RestartTimer (void)
 

Private Attributes

uv_loop_t * m_Loop
 
size_t m_RequestId
 
int m_FD
 
EPSGS_Event m_Event
 
uv_timer_t m_TimerReq
 
uint64_t m_TimerMillisec
 
bool m_TimerActive
 
uv_poll_t m_PollReq
 
bool m_PollActive
 
bool m_TimerHandleClosed
 
bool m_PollHandleClosed
 
void * m_UserData
 
TEventCB m_EventCB
 
TTimeoutCB m_TimeoutCB
 
TErrorCB m_ErrorCB
 

Detailed Description

Definition at line 45 of file psgs_io_callbacks.hpp.

Member Typedef Documentation

◆ TErrorCB

using CPSGS_SocketIOCallback::TErrorCB = function<EPSGS_PollContinue(const string & message, void * user_data)>

Definition at line 67 of file psgs_io_callbacks.hpp.

◆ TEventCB

using CPSGS_SocketIOCallback::TEventCB = function<EPSGS_PollContinue(void * user_data)>

Definition at line 65 of file psgs_io_callbacks.hpp.

◆ TTimeoutCB

using CPSGS_SocketIOCallback::TTimeoutCB = function<EPSGS_PollContinue(void * user_data)>

Definition at line 66 of file psgs_io_callbacks.hpp.

Member Enumeration Documentation

◆ EPSGS_Event

Enumerator
ePSGS_Readable 
ePSGS_Writable 
ePSGS_Disconnect 
ePSGS_Prioritized 

Definition at line 49 of file psgs_io_callbacks.hpp.

◆ EPSGS_PollContinue

Enumerator
ePSGS_StopPolling 
ePSGS_ContinuePolling 

Definition at line 60 of file psgs_io_callbacks.hpp.

Constructor & Destructor Documentation

◆ CPSGS_SocketIOCallback() [1/3]

CPSGS_SocketIOCallback::CPSGS_SocketIOCallback ( uv_loop_t *  loop,
size_t  request_id,
int  fd,
EPSGS_Event  event,
uint64_t  timeout_millisec,
void *  user_data,
TEventCB  event_cb,
TTimeoutCB  timeout_cb,
TErrorCB  error_cb 
)

Definition at line 78 of file psgs_io_callbacks.cpp.

◆ ~CPSGS_SocketIOCallback()

CPSGS_SocketIOCallback::~CPSGS_SocketIOCallback ( )

Definition at line 103 of file psgs_io_callbacks.cpp.

◆ CPSGS_SocketIOCallback() [2/3]

CPSGS_SocketIOCallback::CPSGS_SocketIOCallback ( const CPSGS_SocketIOCallback )
delete

◆ CPSGS_SocketIOCallback() [3/3]

CPSGS_SocketIOCallback::CPSGS_SocketIOCallback ( CPSGS_SocketIOCallback &&  )
delete

Member Function Documentation

◆ IsSafeToDelete()

bool CPSGS_SocketIOCallback::IsSafeToDelete ( void  )

◆ operator=()

CPSGS_SocketIOCallback& CPSGS_SocketIOCallback::operator= ( const CPSGS_SocketIOCallback )
delete

◆ StartPolling()

void CPSGS_SocketIOCallback::StartPolling ( void  )

Definition at line 111 of file psgs_io_callbacks.cpp.

References x_StartPolling(), and x_StartTimer().

Referenced by CPSGS_UvLoopBinder::SetSocketCallback().

◆ StopPolling()

void CPSGS_SocketIOCallback::StopPolling ( void  )

◆ x_RestartTimer()

void CPSGS_SocketIOCallback::x_RestartTimer ( void  )
private

◆ x_StartPolling()

void CPSGS_SocketIOCallback::x_StartPolling ( void  )
private

◆ x_StartTimer()

void CPSGS_SocketIOCallback::x_StartTimer ( void  )
private

◆ x_StopPolling()

void CPSGS_SocketIOCallback::x_StopPolling ( void  )
private

Definition at line 170 of file psgs_io_callbacks.cpp.

References m_PollActive, m_PollReq, and PSG_ERROR.

Referenced by StopPolling().

◆ x_StopTimer()

void CPSGS_SocketIOCallback::x_StopTimer ( void  )
private

Definition at line 212 of file psgs_io_callbacks.cpp.

References m_TimerActive, m_TimerReq, and PSG_ERROR.

Referenced by StopPolling().

◆ x_UvOnSocketEvent()

void CPSGS_SocketIOCallback::x_UvOnSocketEvent ( int  status)

◆ x_UvOnTimer()

void CPSGS_SocketIOCallback::x_UvOnTimer ( void  )

◆ x_UvSocketPollHandleClosedEvent()

void CPSGS_SocketIOCallback::x_UvSocketPollHandleClosedEvent ( void  )

Definition at line 289 of file psgs_io_callbacks.cpp.

References m_PollHandleClosed.

Referenced by poll_close_cb().

◆ x_UvTimerHandleClosedEvent()

void CPSGS_SocketIOCallback::x_UvTimerHandleClosedEvent ( void  )

Definition at line 283 of file psgs_io_callbacks.cpp.

References m_TimerHandleClosed.

Referenced by poll_timer_close_cb().

Member Data Documentation

◆ m_ErrorCB

TErrorCB CPSGS_SocketIOCallback::m_ErrorCB
private

Definition at line 120 of file psgs_io_callbacks.hpp.

Referenced by x_UvOnSocketEvent().

◆ m_Event

EPSGS_Event CPSGS_SocketIOCallback::m_Event
private

Definition at line 108 of file psgs_io_callbacks.hpp.

Referenced by x_StartPolling().

◆ m_EventCB

TEventCB CPSGS_SocketIOCallback::m_EventCB
private

Definition at line 118 of file psgs_io_callbacks.hpp.

Referenced by x_UvOnSocketEvent().

◆ m_FD

int CPSGS_SocketIOCallback::m_FD
private

Definition at line 107 of file psgs_io_callbacks.hpp.

Referenced by x_StartPolling().

◆ m_Loop

uv_loop_t* CPSGS_SocketIOCallback::m_Loop
private

Definition at line 105 of file psgs_io_callbacks.hpp.

Referenced by x_StartPolling(), and x_StartTimer().

◆ m_PollActive

bool CPSGS_SocketIOCallback::m_PollActive
private

Definition at line 113 of file psgs_io_callbacks.hpp.

Referenced by x_StartPolling(), and x_StopPolling().

◆ m_PollHandleClosed

bool CPSGS_SocketIOCallback::m_PollHandleClosed
private

◆ m_PollReq

uv_poll_t CPSGS_SocketIOCallback::m_PollReq
private

Definition at line 112 of file psgs_io_callbacks.hpp.

Referenced by StopPolling(), x_StartPolling(), and x_StopPolling().

◆ m_RequestId

size_t CPSGS_SocketIOCallback::m_RequestId
private

Definition at line 106 of file psgs_io_callbacks.hpp.

Referenced by x_UvOnSocketEvent(), and x_UvOnTimer().

◆ m_TimeoutCB

TTimeoutCB CPSGS_SocketIOCallback::m_TimeoutCB
private

Definition at line 119 of file psgs_io_callbacks.hpp.

Referenced by x_UvOnTimer().

◆ m_TimerActive

bool CPSGS_SocketIOCallback::m_TimerActive
private

Definition at line 111 of file psgs_io_callbacks.hpp.

Referenced by x_RestartTimer(), x_StartTimer(), and x_StopTimer().

◆ m_TimerHandleClosed

bool CPSGS_SocketIOCallback::m_TimerHandleClosed
private

◆ m_TimerMillisec

uint64_t CPSGS_SocketIOCallback::m_TimerMillisec
private

Definition at line 110 of file psgs_io_callbacks.hpp.

Referenced by x_RestartTimer(), and x_StartTimer().

◆ m_TimerReq

uv_timer_t CPSGS_SocketIOCallback::m_TimerReq
private

Definition at line 109 of file psgs_io_callbacks.hpp.

Referenced by StopPolling(), x_RestartTimer(), x_StartTimer(), and x_StopTimer().

◆ m_UserData

void* CPSGS_SocketIOCallback::m_UserData
private

Definition at line 117 of file psgs_io_callbacks.hpp.

Referenced by x_UvOnSocketEvent(), and x_UvOnTimer().


The documentation for this class was generated from the following files:
Modified on Fri Sep 20 14:57:28 2024 by modify_doxy.py rev. 669887