protected void init ( ) { this . writer = connection . writer ; done = false ; writerThread = new Thread ( ) { public void run ( ) { writePackets ( this ) ; } } ; writerThread . setName ( "Smack Packet Writer (" + connection . connectionCounterValue + ")" ) ; writerThread . setDaemon ( true ) ; }
Initializes the writer in order to be used . It is called at the first connection and also is invoked if the connection is disconnected by an error .