//package bouboule;

import java.io.*;

public class Test1 {
	
	private static Es com1 = new Es("COM1");
	
	public Test1() {}
	
	public static void main(String[] args) {
		try {
			com1.ouvrir();
			String s ="Salut";
			com1.envoyer(s);
			System.out.println("Chaine envoyee : " + s);
			//Thread.sleep(1000);
			String s2 = com1.recevoir();
			System.out.println("Chaine recu : " + s2);
		} catch (Exception e) { System.err.println(e); }
		try {
				com1.fermer();
			} catch (IOException e) { System.err.println(e); }
	}
	
}