package test;

import java.io.IOException;
import java.net.InetAddress;

import chat.Chatroom;
import chat.Chatter;
import chat.TextChatter;
import client.ClientTopicsManager;

public class TestClient {

	/**
	 * @param args
	 * @throws IOException 
	 */
	public static void main(String[] args) throws IOException {
		ClientTopicsManager client = new ClientTopicsManager();
		client.setServer(InetAddress.getLocalHost(), 2300);
		client.connect();
		client.createTopic("topic 1");
		client.createTopic("topic 2");
		//System.out.println("un message");
		//System.out.println(" topics : " + client.listTopics());
		///System.out.println("un autre test");
		//System.out.println("topic joingned : " + client.joinTopic("topic 2"));
		//Chatroom chatroom = client.joinTopic("topic 2");
		
		//Chatter chatter = new TextChatter("nj");
		
		//chatroom.join(chatter);
		
		//System.out.println("sur le point d'envoyer un message");
		//chatroom.post("mon super message2", chatter);
		//chatroom.quit(chatter);
	}

}
