ConnectionHandler

Search for usage in LXR

ConnectionHandler Class Reference

#include <handler.h>

Inheritance diagram for ConnectionHandler:

Public Member Functions

 ConnectionHandler (const ConnectionHandler &)=delete
 
 ConnectionHandler (int fd)
 
int handle ()
 
ConnectionHandleroperator= (const ConnectionHandler &)=delete
 
void sendExitCode ()
 
- Public Member Functions inherited from SocketSecurity
 SocketSecurity (int fd)
 
int peerGid () const
 
int peerPid () const
 
int peerUid () const
 

Public Attributes

int m_exitCode
 
bool m_hasExitCode
 
bool m_needExitCode
 
pid_t m_pid
 

Detailed Description

A ConnectionHandler handles a client.

It is called from the main program loop whenever there is data to read from a corresponding socket. It keeps reading data until a newline is read. Then, a command is parsed and executed.

Definition at line 22 of file handler.h.

Constructor & Destructor Documentation

◆ ConnectionHandler()

ConnectionHandler::ConnectionHandler ( int fd)

Definition at line 35 of file handler.cpp.

◆ ~ConnectionHandler()

ConnectionHandler::~ConnectionHandler ( )

Definition at line 47 of file handler.cpp.

Member Function Documentation

◆ handle()

int ConnectionHandler::handle ( )

Handle incoming data.

Definition at line 58 of file handler.cpp.

◆ sendExitCode()

void ConnectionHandler::sendExitCode ( )

Definition at line 113 of file handler.cpp.

Member Data Documentation

◆ m_exitCode

int ConnectionHandler::m_exitCode

Definition at line 52 of file handler.h.

◆ m_hasExitCode

bool ConnectionHandler::m_hasExitCode

Definition at line 53 of file handler.h.

◆ m_needExitCode

bool ConnectionHandler::m_needExitCode

Definition at line 54 of file handler.h.

◆ m_pid

pid_t ConnectionHandler::m_pid

Definition at line 55 of file handler.h.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:53:51 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.