/* * Created on Jul 24, 2004 * * To change the template for this generated file go to * Window>Preferences>Java>Code Generation>Code and Comments */ package net.sourceforge.phpeclipse.phpunit; import java.net.ServerSocket; import java.net.Socket; /** * @author Ali Echihabi * * To change the template for this generated type comment go to * Window>Preferences>Java>Code Generation>Code and Comments */ public class ConnectionListener extends Thread { private ServerSocket sSocket = null; private Socket serviceSocket = null; private PHPUnitView view; public void start(PHPUnitView view) { this.view = view; super.start(); } public void run() { try { //reportArea.append("listening at port 12345"); sSocket = new ServerSocket(12345); // accept connection from test reporter. serviceSocket = sSocket.accept(); (new ReportListener(serviceSocket, this.view)).start(); sSocket.close(); } catch (Exception e) { e.printStackTrace(); } } // end of run() public static void main(String[] args) { (new ConnectionListener()).start(new PHPUnitView()); } }