OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Utility class provides the server interface to ossimTool-derived functionality via TCP sockets Results are returned either as streamed text (for non-image responses such as image info) or streamed binary file representing imagery or vector products. More...
#include <ossimToolServer.h>
Public Member Functions | |
ossimToolServer () | |
~ossimToolServer () | |
void | startListening (const char *portid) |
Private Member Functions | |
void | initSocket (const char *portid) |
bool | processOssimRequest (struct sockaddr_in &cli_addr) |
bool | runCommand (ossimString &command) |
void | writeSocket (const char *buf, int bufsize) |
bool | sendFile (const ossimFilename &fname) |
void | error (const char *msg) |
bool | acknowledgeRcvd () |
Static Private Member Functions | |
static void | sigchld_handler (int s) |
Private Attributes | |
int | m_svrsockfd |
int | m_clisockfd |
char * | m_buffer |
Utility class provides the server interface to ossimTool-derived functionality via TCP sockets Results are returned either as streamed text (for non-image responses such as image info) or streamed binary file representing imagery or vector products.
Clients interfacing to this class should know the commands available (or execute the command "help" and view the text response).
Definition at line 21 of file ossimToolServer.h.
ossimToolServer::ossimToolServer | ( | ) |
Definition at line 53 of file ossimToolServer.cpp.
ossimToolServer::~ossimToolServer | ( | ) |
|
private |
Definition at line 291 of file ossimToolServer.cpp.
References _DEBUG_, error(), m_buffer, m_clisockfd, and n.
Referenced by runCommand(), and sendFile().
|
private |
Definition at line 207 of file ossimToolServer.cpp.
Referenced by acknowledgeRcvd(), initSocket(), processOssimRequest(), runCommand(), sendFile(), startListening(), and writeSocket().
|
private |
Definition at line 141 of file ossimToolServer.cpp.
References error(), m_svrsockfd, OINFO, and sigchld_handler().
Referenced by startListening().
|
private |
Definition at line 434 of file ossimToolServer.cpp.
References _DEBUG_, error(), m_buffer, m_clisockfd, MAX_BUF_LEN, n, runCommand(), and ossimString::trim().
Referenced by startListening().
|
private |
Definition at line 304 of file ossimToolServer.cpp.
References acknowledgeRcvd(), ossimString::after(), ossimString::before(), ossimToolFactoryBase::createTool(), ossimString::empty(), error(), ossimTool::execute(), ossimRefPtr< T >::get(), ossimToolFactoryBase::getCapabilities(), ossimChipProcTool::getProductFilename(), ossimTool::helpRequested(), ossimTool::initialize(), ossimToolRegistry::instance(), ossimTool::isChipProcessor(), m_buffer, m_clisockfd, MAX_BUF_LEN, n, sendFile(), ossimString::trim(), ossimRefPtr< T >::valid(), writeSocket(), and x.
Referenced by processOssimRequest().
|
private |
Definition at line 230 of file ossimToolServer.cpp.
References _DEBUG_, acknowledgeRcvd(), ossimString::chars(), error(), ossimFilename::file(), m_buffer, MAX_BUF_LEN, n, and writeSocket().
Referenced by runCommand().
|
staticprivate |
Definition at line 199 of file ossimToolServer.cpp.
Referenced by initSocket().
void ossimToolServer::startListening | ( | const char * | portid | ) |
Definition at line 65 of file ossimToolServer.cpp.
References error(), FORK_PROCESS, initSocket(), m_buffer, m_clisockfd, m_svrsockfd, n, OINFO, and processOssimRequest().
|
private |
Definition at line 213 of file ossimToolServer.cpp.
References error(), m_clisockfd, and n.
Referenced by runCommand(), and sendFile().
|
private |
Definition at line 41 of file ossimToolServer.h.
Referenced by acknowledgeRcvd(), processOssimRequest(), runCommand(), sendFile(), and startListening().
|
private |
Definition at line 40 of file ossimToolServer.h.
Referenced by acknowledgeRcvd(), processOssimRequest(), runCommand(), startListening(), and writeSocket().
|
private |
Definition at line 39 of file ossimToolServer.h.
Referenced by initSocket(), startListening(), and ~ossimToolServer().