TcpClient, TcpListener Object Reuse UPDATE!!

TcpClient, TcpListener Object Reuse UPDATE!!

Post by Y2xhc3NBY3 » Fri, 04 Nov 2005 03:31:08


UPDATE:
I have just determined that when stepping the through the application in the
VS de *** , the recreated TcpClient/TcpListener objects work correctly EVERY
TIME. This would lead me to suspect that there are timing issues related to
the .NET runtime's release of the underlying Win32 Socket handles. Can
anyone confirm or deny this hypothesis?
 
 
 

TcpClient, TcpListener Object Reuse UPDATE!!

Post by William St » Fri, 04 Nov 2005 07:44:23

At this point, posting a code sample that shows the issue would be most
helpful. I have not seen or heard about the issue you describe, so it may
be a code issue.

--
William Stacey [MVP]

 
 
 

TcpClient, TcpListener Object Reuse UPDATE!!

Post by Y2xhc3NBY3 » Fri, 04 Nov 2005 09:00:02

hanks, William, but I just found the solution to the problem. Earlier in
this thread, Vadym Statsyak reminded me that TcpListener.Close must be called
before reopeing the object and I just found one execution path branch that
did not include that call. After putting it in, all works as it should.
Thanks.

"William Stacey [MVP]" wrote: