version 1.34.2.4, 2001/08/15 23:43:47
|
version 1.34.2.5, 2001/08/20 02:38:07
|
|
|
#include <iostream> | #include <iostream> |
#include <cstdlib> | #include <cstdlib> |
#include <Pegasus/Common/FileSystem.h> | #include <Pegasus/Common/FileSystem.h> |
#include <Pegasus/Common/Selector.h> |
#include <Pegasus/Common/Monitor.h> |
#include <Pegasus/Server/CIMServer.h> | #include <Pegasus/Server/CIMServer.h> |
#include <Pegasus/Common/PegasusVersion.h> | #include <Pegasus/Common/PegasusVersion.h> |
#include <Pegasus/Protocol/Handler.h> | #include <Pegasus/Protocol/Handler.h> |
|
|
char *url = serviceURL.allocateCString(); | char *url = serviceURL.allocateCString(); |
// free(host_name); | // free(host_name); |
| |
Selector selector; |
Monitor monitor; |
CIMServer server(&selector, pegasusHome); |
CIMServer server(&monitor, pegasusHome); |
| |
// bind throws an exception of the bind fails | // bind throws an exception of the bind fails |
cout << "Binding to " << address << endl; | cout << "Binding to " << address << endl; |
server.bind(address); |
|
|
char* end = 0; |
|
long portNumber = strtol(address, &end, 10); |
|
assert(end != 0 && *end == '\0'); |
|
server.bind(portNumber); |
|
|
delete [] address; | delete [] address; |
| |
time_t last = 0; | time_t last = 0; |