c55f7d34ec
2. Column headers are now printed for caw 'log' output. 3. The websocket LLL_NOTICE logs may now be turned off using the 'extraLogsFl'. 4. Changed the 'Number' processor to work with the 'feedback' example. 5. README.md updates.
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
#ifndef cwWebsockSvr_H
|
|
#define cwWebsockSvr_H
|
|
|
|
namespace cw {
|
|
|
|
namespace websockSrv
|
|
{
|
|
typedef handle<struct websockSrv_str> handle_t;
|
|
|
|
rc_t create(
|
|
handle_t& h,
|
|
websock::cbFunc_t cbFunc, // This callback is made from the thread identified by websockSrv::threadHandle().
|
|
void* cbArg,
|
|
const char* physRootDir,
|
|
const char* dfltHtmlPageFn,
|
|
int port,
|
|
const websock::protocol_t* protocolA,
|
|
unsigned protocolN,
|
|
unsigned websockTimeOutMs,
|
|
unsigned queueBlkCnt,
|
|
unsigned queueBlkByteCnt,
|
|
bool extraLogsFl );
|
|
|
|
rc_t destroy( handle_t& h );
|
|
|
|
thread::handle_t threadHandle( handle_t h );
|
|
websock::handle_t websockHandle( handle_t h );
|
|
|
|
// Start or unpause the server.
|
|
rc_t start( handle_t h );
|
|
|
|
// Put the server into a pause state.
|
|
rc_t pause( handle_t h );
|
|
|
|
}
|
|
|
|
rc_t websockSrvTest( const object_t* cfg );
|
|
}
|
|
|
|
#endif
|