PC Review


Reply
Thread Tools Rate Thread

how to close open socket

 
 
rooster575
Guest
Posts: n/a
 
      28th Aug 2003
I would like to force a socket closed if it is currently open.

For arguments sake, say a function failed to close a socket and another
function would like to use this same socket.
I get the following error:
Only one usage of each socket address (protocol/network address/port) is
normally permitted

Obvously it would be better if the socket was closed correctly the 1st time,
but again, for arguments sake, please assume that it is left open and must
be forced closed by another function.

Thanks in advance.



 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      28th Aug 2003
Hello,

"rooster575" <(E-Mail Removed)> schrieb:
> I would like to force a socket closed if it is currently open.
>
> For arguments sake, say a function failed to close a socket and another
> function would like to use this same socket.
> I get the following error:
> Only one usage of each socket address (protocol/network address/port) is
> normally permitted
>
> Obvously it would be better if the socket was closed correctly the 1st

time,
> but again, for arguments sake, please assume that it is left open and must
> be forced closed by another function.


How do you close the socket? By calling its Close method? Post your code.

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
socket.close() Ronny Microsoft C# .NET 1 13th Jan 2010 06:23 PM
Does Socket.Shutdown() or Socket.Close() block? PAzevedo@gmail.com Microsoft C# .NET 1 5th Nov 2006 10:46 PM
How to close another socket Nuno Magalhaes Microsoft C# .NET 4 4th Oct 2005 06:47 PM
re: How to close another socket Chad Z. Hower a.k.a. Kudzu [msft] Microsoft C# .NET 0 4th Oct 2005 12:04 PM
Does Socket.Shutdown or Socket.Close Block and when? =?Utf-8?B?Q2hyaXMgVGFuZ2Vy?= Microsoft C# .NET 4 16th Oct 2004 08:40 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:33 PM.