* @throws IllegalStateException if the protocol is not connected.
*/
public void disconnect() throws IllegalStateException
{
if(reader == null || writer == null)
throw new IllegalStateException("Not yet connected to Yahoo");
// send the logoff packet
Packet pack = new Packet(SERVICE_LOGOFF, STATUS_AVAILABLE, sessionID);
sendToWriterThread(pack);