SysServerStream Class Reference

#include <SysCSStream.hpp>

Public Member Functions

 SysServerStream ()
 
 SysServerStream (const char *name)
 
 SysServerStream (int port)
 
 ~SysServerStream ()
 
CSErrorCodeT getError (void)
 
bool make (const char *)
 
bool make (int)
 
SysServerConnection * connect ()
 
bool close ()
 
void setDomain (int newdomain)
 
void setType (int newtype)
 
void setProtocol (int newprotocol)
 
void setBackLog (int newbacklog)
 
bool isClean ()
 
 SysServerStream ()
 
 SysServerStream (const char *name)
 
 SysServerStream (int port)
 
 ~SysServerStream ()
 
CSErrorCodeT getError (void)
 
bool make (const char *)
 
bool make (int)
 
SysServerConnection * connect ()
 
bool close ()
 
void setDomain (int newdomain)
 
void setType (int newtype)
 
void setProtocol (int newprotocol)
 
void setBackLog (int newbacklog)
 
bool isClean ()
 

Protected Attributes

CSErrorCodeT errcode
 
int s
 
int domain
 
int type
 
int protocol
 
int backlog
 
SOCKET s
 

Detailed Description

Definition at line 149 of file unix/SysCSStream.hpp.

Constructor & Destructor Documentation

◆ SysServerStream() [1/6]

SysServerStream::SysServerStream ( )

Standard constructor.

Definition at line 399 of file unix/SysCSStream.cpp.

References backlog, CSERROR_OK, domain, errcode, protocol, s, and type.

◆ SysServerStream() [2/6]

SysServerStream::SysServerStream ( const char *  name)

Alternate constructor.

Parameters
nameHostname and port in the form "hostname:port".

Definition at line 415 of file unix/SysCSStream.cpp.

References backlog, CSERROR_OK, domain, errcode, make(), protocol, s, and type.

◆ SysServerStream() [3/6]

SysServerStream::SysServerStream ( int  port)

Alternate constructor.

Parameters
portPort number to listen on.

Definition at line 432 of file unix/SysCSStream.cpp.

References backlog, CSERROR_OK, domain, errcode, make(), protocol, s, and type.

◆ ~SysServerStream() [1/2]

SysServerStream::~SysServerStream ( )

Standard destructor.

Definition at line 447 of file unix/SysCSStream.cpp.

References close().

◆ SysServerStream() [4/6]

SysServerStream::SysServerStream ( )

◆ SysServerStream() [5/6]

SysServerStream::SysServerStream ( const char *  name)

◆ SysServerStream() [6/6]

SysServerStream::SysServerStream ( int  port)

◆ ~SysServerStream() [2/2]

SysServerStream::~SysServerStream ( )

Member Function Documentation

◆ close() [1/2]

bool SysServerStream::close ( )

Close the server connection.

Returns
True on an error, otherwise false

Definition at line 569 of file unix/SysCSStream.cpp.

References CSERROR_INTERNAL, CSERROR_OK, errcode, and s.

Referenced by APIServer::terminateServer(), and ~SysServerStream().

◆ close() [2/2]

bool SysServerStream::close ( )

◆ connect() [1/2]

SysServerConnection * SysServerStream::connect ( void  )

Accept a connection from a client.

Returns
True on an error, otherwise false

Definition at line 542 of file unix/SysCSStream.cpp.

References CSERROR_CONNX_FAILED, CSERROR_INTERNAL, CSERROR_OK, errcode, and s.

Referenced by APIServer::listenForConnections().

◆ connect() [2/2]

SysServerConnection* SysServerStream::connect ( )

◆ getError() [1/2]

CSErrorCodeT SysServerStream::getError ( void  )
inline

Definition at line 164 of file unix/SysCSStream.hpp.

References errcode.

◆ getError() [2/2]

CSErrorCodeT SysServerStream::getError ( void  )
inline

Definition at line 159 of file windows/SysCSStream.hpp.

References errcode.

◆ isClean() [1/2]

bool SysServerStream::isClean ( )
inline

Definition at line 190 of file unix/SysCSStream.hpp.

References CSERROR_OK, and errcode.

◆ isClean() [2/2]

bool SysServerStream::isClean ( )
inline

Definition at line 185 of file windows/SysCSStream.hpp.

References CSERROR_OK, and errcode.

◆ make() [1/4]

bool SysServerStream::make ( const char *  name)

Make a sever connection.

Parameters
nameHostname and port in the form "hostname:port".
Returns
True on an error, otherwise false

Definition at line 461 of file unix/SysCSStream.cpp.

References CSERROR_HOSTNAME_PORT, and errcode.

Referenced by APIServer::initServer(), and SysServerStream().

◆ make() [2/4]

bool SysServerStream::make ( const char *  )

◆ make() [3/4]

bool SysServerStream::make ( int  port)

Make a server connection.

Parameters
portPort to use for the connection.
Returns
True on an error, otherwise false

Definition at line 496 of file unix/SysCSStream.cpp.

References backlog, CSERROR_CONNX_EXISTS, CSERROR_INTERNAL, CSERROR_OK, CSERROR_UNKNOWN, domain, errcode, protocol, s, and type.

◆ make() [4/4]

bool SysServerStream::make ( int  )

◆ setBackLog() [1/2]

void SysServerStream::setBackLog ( int  newbacklog)
inline

Definition at line 186 of file unix/SysCSStream.hpp.

References backlog.

◆ setBackLog() [2/2]

void SysServerStream::setBackLog ( int  newbacklog)
inline

Definition at line 181 of file windows/SysCSStream.hpp.

References backlog.

◆ setDomain() [1/2]

void SysServerStream::setDomain ( int  newdomain)
inline

Definition at line 174 of file unix/SysCSStream.hpp.

References domain.

◆ setDomain() [2/2]

void SysServerStream::setDomain ( int  newdomain)
inline

Definition at line 169 of file windows/SysCSStream.hpp.

References domain.

◆ setProtocol() [1/2]

void SysServerStream::setProtocol ( int  newprotocol)
inline

Definition at line 182 of file unix/SysCSStream.hpp.

References protocol.

◆ setProtocol() [2/2]

void SysServerStream::setProtocol ( int  newprotocol)
inline

Definition at line 177 of file windows/SysCSStream.hpp.

References protocol.

◆ setType() [1/2]

void SysServerStream::setType ( int  newtype)
inline

Definition at line 178 of file unix/SysCSStream.hpp.

References type.

◆ setType() [2/2]

void SysServerStream::setType ( int  newtype)
inline

Definition at line 173 of file windows/SysCSStream.hpp.

References type.

Member Data Documentation

◆ backlog

int SysServerStream::backlog
protected

Definition at line 157 of file unix/SysCSStream.hpp.

Referenced by make(), setBackLog(), and SysServerStream().

◆ domain

int SysServerStream::domain
protected

Definition at line 154 of file unix/SysCSStream.hpp.

Referenced by make(), setDomain(), and SysServerStream().

◆ errcode

CSErrorCodeT SysServerStream::errcode
protected

Definition at line 152 of file unix/SysCSStream.hpp.

Referenced by close(), connect(), getError(), isClean(), make(), and SysServerStream().

◆ protocol

int SysServerStream::protocol
protected

Definition at line 156 of file unix/SysCSStream.hpp.

Referenced by make(), setProtocol(), and SysServerStream().

◆ s [1/2]

int SysServerStream::s
protected

Definition at line 153 of file unix/SysCSStream.hpp.

Referenced by close(), connect(), make(), and SysServerStream().

◆ s [2/2]

SOCKET SysServerStream::s
protected

Definition at line 148 of file windows/SysCSStream.hpp.

◆ type

int SysServerStream::type
protected

Definition at line 155 of file unix/SysCSStream.hpp.

Referenced by make(), setType(), and SysServerStream().


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