KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SsnLimit


1 import jcifs.*;
2 import jcifs.smb.*;
3
4 public class SsnLimit {
5
6     public static void main( String JavaDoc argv[] ) throws Exception JavaDoc {
7         jcifs.Config.setProperty( "jcifs.smb.client.ssnLimit", "1" );
8         NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication( null, null, null );
9         UniAddress addr = UniAddress.getByName( argv[0] );
10         for( int i = 0; i < 25; i++ ) {
11             SmbSession.logon( addr, auth );
12             Thread.sleep( 1000 );
13         }
14         Thread.sleep( 10000 );
15     }
16 }
17
18
Popular Tags