passUp(new Event(Event.DISCONNECT_OK));
    public void down(Event evt) {        Message leave_msg;        switch(evt.getType()) {            case Event.DISCONNECT:                leave_msg=new Message();                leave_msg.putHeader(name, new SmackHeader(SmackHeader.LEAVE_ANNOUNCEMENT, -1));                passDown(new Event(Event.MSG, leave_msg));                passUp(new Event(Event.DISCONNECT_OK));                break;            case Event.CONNECT:                //passUp(new Event(Event.CONNECT_OK));                // Do not send JOIN_ANOUNCEMENT here, don't know yet if the transport is OK.                // Send it later when handling CONNECT_OK from below//                 sender_win=new AckMcastSenderWindow(this, timeout);//                 // send join announcement//                 Message join_msg=new Message();//                 join_msg.putHeader(name, new SmackHeader(SmackHeader.JOIN_ANNOUNCEMENT, -1));//                 passDown(new Event(Event.MSG, join_msg));//                 return;                break;// add a header with the current sequence number and increment seqno            case Event.MSG:                Message msg=(Message)evt.getArg();                if(msg == null) break;                if(msg.getDest() == null || msg.getDest().isMulticastAddress()) {                    msg.putHeader(name, new SmackHeader(SmackHeader.MCAST, seqno));                    sender_win.add(seqno, msg, (Vector)members.clone());                    if(Trace.debug) Trace.info("SMACK.down()", "sending mcast #" + seqno);                    seqno++;                }                break;        }        passDown(evt);    }