Jpp  15.0.5
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
JNET::JSocketStatus Class Reference

Auxiliary class for non-blocking socket I/O. More...

#include <JSocketStatus.hh>

Inheritance diagram for JNET::JSocketStatus:
JNET::JSocketBuffer< JElement_t > JNET::JSocketNonblockingReader JNET::JSocketNonblockingWriter JNET::JSocketInputChannel< JPrefix_t > JNET::JSocketOutputChannel< JPrefix_t >

Public Types

enum  JStatus_t { IO_RESET = -1, IO_READY = 0, IO_BUSY = +1 }
 

Public Member Functions

 JSocketStatus ()
 Default constructor. More...
 
JStatus_t getStatus () const
 Get status of I/O. More...
 
bool isReset () const
 Check reset status. More...
 
bool isBusy () const
 Check busy status. More...
 
bool isReady () const
 Check ready status. More...
 
int getCounter () const
 Get number of I/O attempts. More...
 
void reset ()
 Reset. More...
 

Protected Member Functions

void setStatus (const JStatus_t status)
 Set status of I/O. More...
 

Protected Attributes

JStatus_t status
 
int counter
 

Detailed Description

Auxiliary class for non-blocking socket I/O.

Definition at line 22 of file JSocketStatus.hh.

Member Enumeration Documentation

Enumerator
IO_RESET 
IO_READY 
IO_BUSY 

Definition at line 26 of file JSocketStatus.hh.

Constructor & Destructor Documentation

JNET::JSocketStatus::JSocketStatus ( )
inline

Default constructor.

Definition at line 32 of file JSocketStatus.hh.

Member Function Documentation

JStatus_t JNET::JSocketStatus::getStatus ( ) const
inline

Get status of I/O.

Returns
status

Definition at line 43 of file JSocketStatus.hh.

44  {
45  return status;
46  }
bool JNET::JSocketStatus::isReset ( ) const
inline

Check reset status.

Returns
true if reset; else false

Definition at line 54 of file JSocketStatus.hh.

55  {
56  return status == IO_RESET;
57  }
bool JNET::JSocketStatus::isBusy ( ) const
inline

Check busy status.

Returns
true if busy; else false

Definition at line 65 of file JSocketStatus.hh.

66  {
67  return status == IO_BUSY;
68  }
bool JNET::JSocketStatus::isReady ( ) const
inline

Check ready status.

Returns
true if ready; else false

Definition at line 76 of file JSocketStatus.hh.

77  {
78  return status == IO_READY;
79  }
int JNET::JSocketStatus::getCounter ( ) const
inline

Get number of I/O attempts.

Returns
number of I/O attempts

Definition at line 87 of file JSocketStatus.hh.

88  {
89  return counter;
90  }
void JNET::JSocketStatus::reset ( )
inline

Reset.

Definition at line 96 of file JSocketStatus.hh.

void JNET::JSocketStatus::setStatus ( const JStatus_t  status)
inlineprotected

Set status of I/O.

Parameters
statusstatus

Definition at line 109 of file JSocketStatus.hh.

110  {
111  this->status = status;
112  }

Member Data Documentation

JStatus_t JNET::JSocketStatus::status
protected

Definition at line 115 of file JSocketStatus.hh.

int JNET::JSocketStatus::counter
protected

Definition at line 116 of file JSocketStatus.hh.


The documentation for this class was generated from the following file: