#840 Dual stack on windows 2003

closed
nobody
None
5
2012-06-09
2012-05-15
Girish Kumar
No

Windows 2003 doesnt support dual stack mode(ipv6 and ipv4). i decided to create 2 sockets-one for v4 and another for v6.
All i want is to listen to both v4 and v6 soap requests simultaneously without blocking each other

sample code goes like this:
struct soap gSoapEnv;
struct soap gSoapEnv2;
soap_init(&gSoapEnv);
gSoapEnv.bind_flags = SO_REUSEADDR ;
soap_init(&gSoapEnv2);
int master2 = soap_bind(&gSoapEnv2, "0.0.0.0", 8085, 5);
int master = soap_bind(&gSoapEnv, "::0",8085, 5);

while(1)
{
slave = soap_accept(&gsoapEnv);
slave2 = soap_accept(&gsoapEnv2);
}

Is this the right way to do it. creating 2 soap variables.
and also soap_accept - is it non-blocking. what should i check in soap accept that it has valid request accept.

Any better way to create 2 sockets and listen to both without blocking each other.(ipv4 and ipv6).

Discussion

  • Girish Kumar
    Girish Kumar
    2012-05-15

    • priority: 5 --> 9
     
    • priority: 9 --> 5
    • status: open --> closed
     
  • The problem here is that both soap contexts listen to the same port. I suggest to use different ports.

    I don't think your approach works. Let us know if it does(!)