Posted By:
Bjornie_Wikstroem
Posted On:
Tuesday, June 4, 2002 02:19 PM
The SSLSocket extends the Socket-class, so to figure out if it's a regular Socket you can do like this:
public void CheckSocket ( Socket socket ) {
if ( socket instanceof javax.net.ssl.SSLSocket ) {
System.out.println ( "The socket was an instance of SSLSocket" );
}
else {
System.out.println ( "The socket was NOT an instance of SSLSocket - it's was a pure, regular Socket" );
}
}