39#ifndef __HttpServCon_h
40#define __HttpServCon_h
42#include <HttpConnection.h>
49typedef void (*HttpServCon_AcceptNewCon)(
65 void operator delete(
void* d) {
if(d)
::baFree(d); }
66 void *
operator new(size_t,
void *place) {
return place; }
67 void operator delete(
void*,
void *) { }
141 const void* interfaceName=0,
142 HttpServCon_AcceptNewCon userDefinedAccept=0);
152 int setPort(U16 portNumber,
bool setIp6=
false,
153 const void* interfaceName=0);
160 HttpServCon_AcceptNewCon userDefinedAccept;
169 struct SoDisp* dispatcher,
172 const void* interfaceName,
173 HttpServCon_AcceptNewCon userDefinedAccept);
174#define HttpServCon_isValid(o) \
175 SoDispCon_isValid((SoDispCon*)(o))
176BA_API
int HttpServCon_setPort(
HttpServCon* o, U16 portNumber,
177 BaBool setIp6,
const void* interfaceName);
179BA_API
int HttpServCon_init(
184 const void* interfaceName);
187BA_API
void HttpServCon_bindExec(
SoDispCon* con);
195 const void* interfaceName,
196 HttpServCon_AcceptNewCon userDefinedAccept) {
197 HttpServCon_constructor(
this,server,dispatcher,port,setIP6,interfaceName,
200inline HttpServCon::~HttpServCon() {
201 HttpServCon_destructor(
this);
205 U16 portNumber,
bool setIp6,
const void* interfaceName) {
206 return HttpServCon_setPort(
this,portNumber,setIp6?TRUE:FALSE,interfaceName);
void * baMalloc(size_t size)
Returns pointer to uninitialized newly-allocated space for an object of size "size",...
void baFree(void *p)
Deallocates space to which it points.
Contains information about the physical socket connection.
Definition: HttpConnection.h:76
Create a server listen object.
Definition: HttpServCon.h:61
BaBool isValid()
Returns true if the constructor successfully opened the listen socket; otherwise, false is returned.
Definition: HttpServCon.h:203
int setPort(U16 portNumber, bool setIp6=false, const void *interfaceName=0)
Change the port number for the "listen" object.
Definition: HttpServCon.h:204
HttpServCon(HttpServer *server, SoDisp *dispatcher, U16 port=80, BaBool setIP6=FALSE, const void *interfaceName=0, HttpServCon_AcceptNewCon userDefinedAccept=0)
Create a Server Connection.
Definition: HttpServCon.h:191
The Web Server.
Definition: HttpServer.h:2864
Contains information about the physical socket connection.
Definition: SoDispCon.h:112
The SoDisp dispatches any socket connection that contains data by calling the SoDispCon::execute memb...
Definition: SoDisp.h:86