Package de.fhkn.in.uce.connectivitymanager.connection

Examples of de.fhkn.in.uce.connectivitymanager.connection.UCESocket.connect()


     * @throws Exception
     */
    public void startChatSource() throws Exception {
        System.out.println("Connecting to target " + this.targetId + " ...");
        final UCESocket socketTpPartner = UCEUnsecureSocketFactory.getInstance().createSourceSocket(this.targetId);
        socketTpPartner.connect();
        System.out.println("Connection to " + this.targetId + " established");
        System.out.println("Starting threads for processing ...");
        final Executor executor = Executors.newCachedThreadPool();
        executor.execute(new ReaderTask(socketTpPartner.getOutputStream()));
        executor.execute(new PrinterTask(socketTpPartner.getInputStream()));
View Full Code Here


     * @throws Exception
     */
    public void startChatTarget() throws Exception {
        System.out.println("Starting target " + this.targetId + " and waiting for source ...");
        final UCESocket socketTpPartner = UCEUnsecureSocketFactory.getInstance().createTargetSocket(this.targetId);
        socketTpPartner.connect();
        System.out.println("Connection established");
        System.out.println("Starting threads for processing ...");
        final Executor executor = Executors.newCachedThreadPool();
        executor.execute(new ReaderTask(socketTpPartner.getOutputStream()));
        executor.execute(new PrinterTask(socketTpPartner.getInputStream()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.