77 |
const long timeout_seconds = 10; // we give the server max. 10 seconds to startup, otherwise we declare the startup as failed |
const long timeout_seconds = 10; // we give the server max. 10 seconds to startup, otherwise we declare the startup as failed |
78 |
try { |
try { |
79 |
pSampler = new Sampler; |
pSampler = new Sampler; |
80 |
pLSCPServer = new LSCPServer(pSampler); |
pLSCPServer = new LSCPServer(pSampler, htonl(LSCP_ADDR), htons(LSCP_PORT)); |
81 |
pLSCPServer->StartThread(); |
pLSCPServer->StartThread(); |
82 |
int res = pLSCPServer->WaitUntilInitialized(timeout_seconds); |
int res = pLSCPServer->WaitUntilInitialized(timeout_seconds); |
83 |
if (res < 0) throw; |
if (res < 0) throw; |