From: Greg2fs on
My problem is than the bind function return -1
If I use SO_REUSEADDR the bind function doesn't return an error but
communcation between my server and client are like if the had returned
-1

For sur I have to avoid my program crashing and I do, but I often have
to stop debugging without letting my program close normaly and it
make me loosing a part of my time. And I think about if the problem
occurs for my users, they will say "f*c#ing app ! Uninstalling... !"

They from what you say it seems that there's no way to reset winsock...
From: Ulrich Eckhardt on
Greg2fs wrote:
> For sur I have to avoid my program crashing and I do, but I often have
> to stop debugging without letting my program close normaly and it
> make me loosing a part of my time. And I think about if the problem
> occurs for my users, they will say "f*c#ing app ! Uninstalling... !"

Greg, I'm working on a program here that includes a webserver, and I also
often kill the program from the debugger or when it crashes, but I never
had the problem you describe. I'm almost sure that it is something
different that's going wrong, I can't imagine an OS that is not capable of
cleaning up after an application has terminated.

Uli

--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

From: David Schwartz on
On Apr 12, 7:52 am, Greg2fs <greg...(a)gmail.com> wrote:

> My problem is than the bind function return -1
> If I use SO_REUSEADDR the bind function doesn't return an error but
> communcation between my server and client are like if the had returned
> -1

I'm not sure how that could be. If 'bind' fails, then 'listen' will
also fail. Are you saying when you use SO_REUSEADDR, 'listen' also
fails? What error does it report? You seem to be leaving out all the
details.

> For sur I have to avoid my program crashing and I do, but I often have
> to stop debugging without letting my program close normaly and it
> make me loosing a part of my time. And I think about if the problem
> occurs for my users, they will say "f*c#ing app ! Uninstalling... !"

For sure your users will be angry if your application crashes a lot.

DS
From: Ulrich Eckhardt on
Greg2fs wrote:
> My problem is than the bind function return -1

Please read the docs at http://msdn.microsoft.com. It tells you exactly how
to detect errors and how to find further info.

Uli

--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

From: Greg2fs on
I don't use "listen" I work with udp conections...
For some days I finaly use SO_REUSEADDR and I didn't have problem
these days,
don't know what did make my program coundn't communicate.
But thanks for your help.