1 /*************************************************************************
2 * @author Ali Echihabi (ali_echihabi@ieee.org, ali.echihabi@souss.ca)
4 * Plugin for PHP unit Testing.
7 *************************************************************************/
9 package net.sourceforge.phpeclipse.phpunit.reporthandling;
11 import java.net.ServerSocket;
12 import java.net.Socket;
14 import net.sourceforge.phpeclipse.phpunit.PHPUnitView;
16 public class ConnectionListener extends Thread {
18 private ServerSocket sSocket = null;
20 private Socket serviceSocket = null;
22 private PHPUnitView view;
24 public void start(PHPUnitView view) {
34 // reportArea.append("listening at port 12345");
36 sSocket = new ServerSocket(12345);
38 // accept connection from test reporter.
39 serviceSocket = sSocket.accept();
41 (new ReportListener(serviceSocket, this.view)).start();
45 } catch (Exception e) {
53 public static void main(String[] args) {
55 (new ConnectionListener()).start(new PHPUnitView());