comparison audioDB.cpp @ 92:caf4ec67ddaf

Give in to expediency and use SO_REUSEADDR on the bind() call. (Allows test cases to be run in quick succession. Possibly allows other stuff, positive and negative.)
author mas01cr
date Wed, 03 Oct 2007 13:53:39 +0000
parents 28211402b9c6
children 69424e77621f
comparison
equal deleted inserted replaced
91:e128f58b0f08 92:caf4ec67ddaf
2480 // Start an audioDB server on the host 2480 // Start an audioDB server on the host
2481 void audioDB::startServer(){ 2481 void audioDB::startServer(){
2482 struct soap soap; 2482 struct soap soap;
2483 int m, s; // master and slave sockets 2483 int m, s; // master and slave sockets
2484 soap_init(&soap); 2484 soap_init(&soap);
2485 // FIXME: largely this use of SO_REUSEADDR is to make writing (and
2486 // running) test cases more convenient, so that multiple test runs
2487 // in close succession don't fail because of a bin() error.
2488 // Investigate whether there are any potential drawbacks in this,
2489 // and also whether there's a better way to write the tests. --
2490 // CSR, 2007-10-03
2491 soap.bind_flags |= SO_REUSEADDR;
2485 m = soap_bind(&soap, NULL, port, 100); 2492 m = soap_bind(&soap, NULL, port, 100);
2486 if (m < 0) 2493 if (m < 0)
2487 soap_print_fault(&soap, stderr); 2494 soap_print_fault(&soap, stderr);
2488 else 2495 else
2489 { 2496 {