package org.distributed;
import java.util.Scanner;
public class Main {

    // entry point
    public static void main(String[] args) throws Exception {

        // create a client
        ChatHandler handler = new ChatHandler();

        // init session
        handler.initializeSession();

        // create scanner for user input
        Scanner sc = new Scanner(System.in);

        // log in user
        handler.promptForUser(sc);

        // specify correspondent
        handler.promptForCorespondent(sc);

        // start conversation
        handler.startConversation(sc);

        // close session after all receivers are processed
        handler.closeSession();
    }
}
