cisst-saw
Loading...
Searching...
No Matches
osaSocketServer Class Reference

#include <osaSocketServer.h>

Inheritance diagram for osaSocketServer:
cmnGenericObject

Public Member Functions

 osaSocketServer (void)
 Default constructor.
 ~osaSocketServer (void)
 Destructor.
bool AssignPort (unsigned short port)
 Set the port for receiving data.
bool Listen (int backlog=5)
 Listen for incoming connections.
osaSocketAccept (void)
 Accept an incoming connection.
void Close (void)
 Close the listening socket.
Public Member Functions inherited from cmnGenericObject
virtual ~cmnGenericObject (void)
virtual const cmnClassServicesBaseServices (void) const =0
bool ReconstructFrom (const cmnGenericObject &other)
std::string ToString (void) const
virtual void ToStream (std::ostream &outputStream) const
virtual void ToStreamRaw (std::ostream &outputStream, const char delimiter=' ', bool headerOnly=false, const std::string &headerPrefix="") const
virtual bool FromStreamRaw (std::istream &inputStream, const char delimiter=' ')
virtual void SerializeRaw (std::ostream &outputStream) const
virtual void DeSerializeRaw (std::istream &inputStream)
virtual cmnLogger::StreamBufTypeGetLogMultiplexer (void) const
virtual size_t ScalarNumber (void) const
virtual bool ScalarNumberIsFixed (void) const
virtual double Scalar (const size_t CMN_UNUSED(index)) const CISST_THROW(std
virtual std::string ScalarDescription (const size_t CMN_UNUSED(index), const std::string &CMN_UNUSED(userDescription)) const

Protected Attributes

int ServerSocketFD

Constructor & Destructor Documentation

◆ osaSocketServer()

osaSocketServer::osaSocketServer ( void )

Default constructor.

◆ ~osaSocketServer()

osaSocketServer::~osaSocketServer ( void )

Destructor.

Member Function Documentation

◆ Accept()

osaSocket * osaSocketServer::Accept ( void )

Accept an incoming connection.

Returns
Pointer to the accepted socket or 0 on failure

◆ AssignPort()

bool osaSocketServer::AssignPort ( unsigned short port)

Set the port for receiving data.

Parameters
portThe port number
Returns
true on success

◆ Close()

void osaSocketServer::Close ( void )

Close the listening socket.

◆ Listen()

bool osaSocketServer::Listen ( int backlog = 5)

Listen for incoming connections.

Returns
true on success

Member Data Documentation

◆ ServerSocketFD

int osaSocketServer::ServerSocketFD
protected

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