News  [SoftwareSite

Latest News
Older News
RSS Feed
 
Complete Projects
Useful Classes
Top Downloads
Message Board
AllAPI.net
 
Send Comments
Software License
Mentalis.org Buttons
Donate
 
Forums -> Security Library Forum
 
SecureSocket.Available property shields socket exceptions  
by At Nel
posted on 2005/08/18

In the latest release, there is a bug in the Available property of SecureSocket. Normally, reading the Avialable property on a socket with result in an exception if the server has closed the socket.

This bug only applies to the socket when SecureProtocol != SecureProtocol.None. I.e. when it IS secured.

A comment in the code states that the Connected property can't be checked since there might be data available in the buffer. This is not correct, both should be checked as follows:

if (!m_Controller.Available && !Connected)
throw new SocketException();

by At Nel
posted on 2005/08/18

Correction:

if ((m_Controller.Available==0) && !Connected)
throw new SocketException();

 

Copyright © 2002-2007, The Mentalis.org Team. All rights reserved.
This site is located at http://www.mentalis.org/
Send comments to the webmaster.